@@ -3,51 +3,23 @@ sdt_path = dirname(dirname(Base.current_project()))
33push! (LOAD_PATH , sdt_path)
44using SpeciesDistributionToolkit
55
6- # Load the rest of the build environment
6+ # These packages are required to build the documentation website
77using Documenter
8- using DocumenterVitepress
98using DocumenterCitations
10- using GeoJSON
9+ using DocumenterVitepress
10+
11+ # These packages are used to generate the cards (for datasets) and pages (for the manual)
1112using Literate
1213using Markdown
1314using InteractiveUtils
1415using Dates
1516using PrettyTables
16- import Downloads
1717
18- # Download the bibliography from paperpile public URL
19- const bibfile = joinpath (@__DIR__ , " src" , " references.bib" )
20- const paperpile_url = " https://paperpile.com/eb/nimbzsGosN"
21- if isfile (bibfile)
22- rm (bibfile)
23- end
24- Downloads. download (paperpile_url, bibfile)
25-
26- # Cleanup the bibliography file to make DocumenterCitations happy despite their
27- # refusal to acknowledge modern field names. The people will partu like it's
28- # 1971 and they will like it.
29- lines = readlines (bibfile)
30- open (bibfile, " w" ) do bfile
31- for line in lines
32- if contains (line, " journaltitle" )
33- println (bfile, replace (line, " journaltitle" => " journal" ))
34- elseif contains (line, " date" )
35- yrmatch = match (r" {(\d {4})" , line)
36- if ! isnothing (yrmatch)
37- println (bfile, " year = {$(yrmatch[1 ]) }," )
38- end
39- println (bfile, line)
40- else
41- println (bfile, line)
42- end
43- end
44- end
45- # Look how they massacred my boy
46-
47- bib = CitationBibliography (
48- bibfile;
49- style = :authoryear ,
50- )
18+ # Steps required before the build
19+ include (joinpath (" steps" , " bibliography.jl" )) # References for the doc
20+ include (joinpath (" steps" , " changelogs.jl" )) # CHANGELOG files on the website
21+ include (joinpath (" steps" , " datasets.jl" )) # Prepare the datasets vignettes
22+ include (joinpath (" steps" , " polygons.jl" )) # Prepare the polygons vignettes
5123
5224# Generate a report card for each known dataset
5325include (" dataset_report.jl" )
@@ -56,9 +28,6 @@ include("polygon_report.jl")
5628# Additional functions to process the text when handled by Literate
5729include (" processing.jl" )
5830
59- # Changelogs
60- include (" changelogs.jl" )
61-
6231# Render the tutorials and how-to using Literate
6332for folder in [" howto" , " tutorials" ]
6433 fpath = joinpath (@__DIR__ , " src" , folder)
0 commit comments