@@ -14,17 +14,22 @@ JuliaAstroDocs.page_ecosystem(ecosystem)
1414# Sync comparison.md
1515JuliaAstroDocs. page_compare (ecosystem_t)
1616
17+ # Aggregate documentation location
18+ clonedir = (" --temp" in ARGS ) ? mktempdir (; cleanup= false ) : joinpath (@__DIR__ , " clones" )
19+ # Build location
20+ outpath = (" --temp" in ARGS ) ? mktempdir (; cleanup= false ) : joinpath (@__DIR__ , " build" )
21+
1722# Prefer online docs, use local as fallback
1823links = InterLinks (
1924 " AstroImages" => (
2025 " https://juliaastro.org/AstroImages/dev/" ,
2126 " https://juliaastro.org/AstroImages/dev/objects.inv" ,
22- joinpath (@__DIR__ , " clones " , " AstroImages" , " dev" , " objects.inv" ),
27+ joinpath (clonedir , " AstroImages" , " dev" , " objects.inv" ),
2328 ),
2429 " AstroLib" => (
2530 " https://juliaastro.org/AstroLib.jl/stable/" ,
2631 " https://juliaastro.org/AstroLib.jl/stable/objects.inv" ,
27- joinpath (@__DIR__ , " clones " , " AstroLib" , " dev" , " objects.inv" ),
32+ joinpath (clonedir , " AstroLib" , " dev" , " objects.inv" ),
2833 )
2934)
3035
@@ -54,6 +59,7 @@ mathengine = MathJax3(Dict(
5459 ),
5560))
5661
62+ @info " Beginning main build for JuliaAstro MultiDocumenter site"
5763makedocs (
5864 sitename = " JuliaAstro" ,
5965 authors = " Julia Astro Contributors" ,
@@ -88,6 +94,7 @@ makedocs(
8894 warnonly = [:missing_docs ],
8995 plugins = [links],
9096)
97+ @info " Initial build complete"
9198
9299postprocess_cb ()
93100
@@ -103,9 +110,7 @@ wrapper_packages = [
103110 " WCS" ,
104111]
105112
106-
107- @info " Building aggregate JuliaAstro site"
108- function generate_multidoc_refs (p; clonedir= joinpath (@__DIR__ , " clones" ))
113+ function generate_multidoc_refs (p; clonedir= clonedir)
109114 package_path = string (chopsuffix (p. name, " .jl" ))
110115 package_name = if package_path in wrapper_packages
111116 " ◯ " * package_path
@@ -133,8 +138,6 @@ function generate_multidoc_refs(p; clonedir=joinpath(@__DIR__, "clones"))
133138 end
134139end
135140
136- ecosystem = JuliaAstroDocs. ecosystem ()
137-
138141docs = [
139142 # JuliaAstro's own generated pages
140143 MultiDocumenter. MultiDocRef (
@@ -153,6 +156,17 @@ docs = [
153156 end ... ,
154157]
155158
159+ # This make file compiles the documentation for the JuliaAstro website.
160+ # It consists of the usual documenter structure, but also follows the approach
161+ # of the SciML docs page https://github.com/SciML/SciMLDocs/blob/main/docs/make.jl
162+ # by generating nested documentation for packages under the JuliaAstro organization.
163+ # That way, docs for all packages are browsable and searchable in one place!
164+
165+ @info " Beginning aggregate build for JuliaAstro site"
166+ @info """
167+ Documentation clone directory: $(clonedir)
168+ Build directory: $(outpath)
169+ """
156170MultiDocumenter. make (
157171 outpath,
158172 docs;
@@ -166,7 +180,10 @@ MultiDocumenter.make(
166180 brand_image = MultiDocumenter. BrandImage (" ." , joinpath (" assets" , " logo.svg" )),
167181 sitemap = true ,
168182)
169- @info " Aggregate build done"
183+ @info " Aggregate build complete"
184+
185+ # Remove dev docs from JuliaAstro site
186+ run (` rm -rf docs/build/Spectra/dev/` )
170187
171188# Download logo
172189# assets_dir = joinpath(outpath, "assets")
0 commit comments