@@ -94,8 +94,8 @@ Aggregates multiple Documenter.jl-based documentation pages `docs` into `outdir`
9494- `assets_dir` is copied into `outdir/assets`
9595- `brand_image` is a `BrandImage(path, imgpath)`, which is rendered as the leftmost
9696 item in the global navigation
97- - `custom_stylesheets` is a `Vector{String}` of stylesheets injected into each page.
98- - `custom_scripts` is a `Vector{String}` of scripts injected into each page.
97+ - `custom_stylesheets` is a `Vector{String}` of relative stylesheet URLs injected into each page.
98+ - `custom_scripts` is a `Vector{String}` of relative script URLs injected into each page.
9999- `search_engine` inserts a global search bar if not `false`. See [`SearchConfig`](@ref) for more details.
100100- `prettyurls` removes all `index.html` suffixes from links in the global navigation.
101101"""
@@ -216,7 +216,11 @@ function make_global_nav(
216216 $([render (doc, dir, thispagepath, prettyurls) for doc in docs])
217217 $(search_engine. engine. render ())
218218 </div>
219- <a id="multidoc-toggler"></a>
219+ <button id="multidoc-toggler">
220+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
221+ <path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2Z"></path>
222+ </svg>
223+ </button>
220224 </nav>
221225 """
222226
@@ -233,7 +237,7 @@ function make_global_stylesheet(custom_stylesheets, path)
233237 Dict (
234238 " rel" => " stylesheet" ,
235239 " type" => " text/css" ,
236- " href" => joinpath (path, stylesheet),
240+ " href" => string (path, " / " , stylesheet),
237241 ),
238242 )
239243 push! (out, style)
@@ -250,7 +254,7 @@ function make_global_scripts(custom_scripts, path)
250254 [],
251255 Gumbo. NullNode (),
252256 Dict (
253- " src" => joinpath (path, script),
257+ " src" => string (path, " / " , script),
254258 " type" => " text/javascript" ,
255259 " charset" => " utf-8" ,
256260 ),
@@ -281,16 +285,11 @@ function inject_styles_and_global_navigation(
281285 search_engine. engine. inject_styles! (custom_stylesheets)
282286 end
283287 pushfirst! (custom_stylesheets, joinpath (" assets" , " default" , " multidoc.css" ))
288+ pushfirst! (custom_scripts, joinpath (" assets" , " default" , " multidoc_injector.js" ))
284289
285290 @sync for (root, _, files) in walkdir (dir)
286291 for file in files
287292 path = joinpath (root, file)
288- if file == " documenter.js"
289- open (path, " a" ) do io
290- println (io, js_injector ())
291- end
292- continue
293- end
294293
295294 endswith (file, " .html" ) || continue
296295
0 commit comments