@@ -14,35 +14,25 @@ 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
31- # This make file compiles the documentation for the JuliaAstro website.
32- # It consists of the usual documenter structure, but also follows the approach
33- # of the SciML docs page https://github.com/SciML/SciMLDocs/blob/main/docs/make.jl
34- # by generating nested documentation for packages under the JuliaAstro organization.
35- # That way, docs for all packages are browsable and searchable in one place!
36-
37- clonedir = (" --temp" in ARGS ) ? mktempdir (; cleanup= false ) : joinpath (@__DIR__ , " clones" )
38- outpath = (" --temp" in ARGS ) ? mktempdir (; cleanup= false ) : joinpath (@__DIR__ , " build" )
39-
40- @info """
41- Cloning packages into: $(clonedir)
42- Building aggregate site into: $(outpath)
43- """
44-
45- @info " Building MultiDocumenter site for JuliaAstro"
4636mathengine = MathJax3 (Dict (
4737 :loader => Dict (" load" => [" [tex]/require" , " [tex]/mathtools" ]),
4838 :tex => Dict (
@@ -51,6 +41,7 @@ mathengine = MathJax3(Dict(
5141 ),
5242))
5343
44+ @info " Beginning main build for JuliaAstro MultiDocumenter site"
5445makedocs (
5546 sitename = " JuliaAstro" ,
5647 authors = " Julia Astro Contributors" ,
@@ -83,6 +74,7 @@ makedocs(
8374 warnonly = [:missing_docs ],
8475 plugins = [links],
8576)
77+ @info " Initial build complete"
8678
8779# Differentiate between pure Julia and wrapper packages
8880wrapper_packages = [
@@ -96,9 +88,7 @@ wrapper_packages = [
9688 " WCS" ,
9789]
9890
99-
100- @info " Building aggregate JuliaAstro site"
101- function generate_multidoc_refs (p; clonedir= joinpath (@__DIR__ , " clones" ))
91+ function generate_multidoc_refs (p; clonedir= clonedir)
10292 package_path = string (chopsuffix (p. name, " .jl" ))
10393 package_name = if package_path in wrapper_packages
10494 " ◯ " * package_path
@@ -126,8 +116,6 @@ function generate_multidoc_refs(p; clonedir=joinpath(@__DIR__, "clones"))
126116 end
127117end
128118
129- ecosystem = JuliaAstroDocs. ecosystem ()
130-
131119docs = [
132120 # JuliaAstro's own generated pages
133121 MultiDocumenter. MultiDocRef (
@@ -146,6 +134,17 @@ docs = [
146134 end ... ,
147135]
148136
137+ # This make file compiles the documentation for the JuliaAstro website.
138+ # It consists of the usual documenter structure, but also follows the approach
139+ # of the SciML docs page https://github.com/SciML/SciMLDocs/blob/main/docs/make.jl
140+ # by generating nested documentation for packages under the JuliaAstro organization.
141+ # That way, docs for all packages are browsable and searchable in one place!
142+
143+ @info " Beginning aggregate build for JuliaAstro site"
144+ @info """
145+ Documentation clone directory: $(clonedir)
146+ Build directory: $(outpath)
147+ """
149148MultiDocumenter. make (
150149 outpath,
151150 docs;
@@ -159,7 +158,10 @@ MultiDocumenter.make(
159158 brand_image = MultiDocumenter. BrandImage (" ." , joinpath (" assets" , " logo.svg" )),
160159 sitemap = true ,
161160)
162- @info " Aggregate build done"
161+ @info " Aggregate build complete"
162+
163+ # Remove dev docs from JuliaAstro site
164+ run (` rm -rf docs/build/Spectra/dev/` )
163165
164166# Download logo
165167# assets_dir = joinpath(outpath, "assets")
0 commit comments