1
1
cd (@__DIR__ )
2
- using Pkg
3
- CI = get (ENV , " CI" , nothing ) == " true" || get (ENV , " GITHUB_TOKEN" , nothing ) != = nothing
4
- CI && Pkg. activate (@__DIR__ )
5
- CI && Pkg. instantiate ()
6
- ENV [" GKSwstype" ] = " 100" # allow local builds without output
7
- using Documenter
8
- using DocumenterTools: Themes
2
+ # Doc-specific (remaining packages are imported in `build_docs_with_style.jl`, which is
3
+ # downloaded)
4
+ using DocumenterCitations
5
+ import Downloads
6
+
7
+ # Packages used in the doc build.
9
8
using CausalityTools
10
9
using ComplexityMeasures
11
10
using StateSpaceSets
12
11
13
- # %% JuliaDynamics theme.
14
- # download the themes
15
- using DocumenterTools: Themes
16
- for file in (" juliadynamics-lightdefs.scss" , " juliadynamics-darkdefs.scss" , " juliadynamics-style.scss" )
17
- download (" https://raw.githubusercontent.com/JuliaDynamics/doctheme/master/$file " , joinpath (@__DIR__ , file))
18
- end
19
- # create the themes
20
- for w in (" light" , " dark" )
21
- header = read (joinpath (@__DIR__ , " juliadynamics-style.scss" ), String)
22
- theme = read (joinpath (@__DIR__ , " juliadynamics-$(w) defs.scss" ), String)
23
- write (joinpath (@__DIR__ , " juliadynamics-$(w) .scss" ), header* " \n " * theme)
24
- end
25
- # compile the themes
26
- Themes. compile (joinpath (@__DIR__ , " juliadynamics-light.scss" ), joinpath (@__DIR__ , " src/assets/themes/documenter-light.css" ))
27
- Themes. compile (joinpath (@__DIR__ , " juliadynamics-dark.scss" ), joinpath (@__DIR__ , " src/assets/themes/documenter-dark.css" ))
28
-
29
- # %% Build docs
30
- cd (@__DIR__ )
31
- ENV [" JULIA_DEBUG" ] = " Documenter"
32
-
33
- PAGES = [
12
+ pages = [
34
13
" Overview" => " index.md" ,
35
14
" Association measures" => " measures.md" ,
36
15
" Independence testing" => " independence.md" ,
@@ -39,26 +18,23 @@ PAGES = [
39
18
" Examples" => " examples.md" ,
40
19
" Predefined systems" => " coupled_systems.md" ,
41
20
" Experimental" => " experimental.md" ,
21
+ " References" => " references.md" ,
42
22
]
43
23
44
- makedocs (
45
- modules = [CausalityTools, ComplexityMeasures, StateSpaceSets],
46
- format = Documenter. HTML (
47
- prettyurls = CI,
48
- sidebar_sitename = false ,
49
- assets = [
50
- asset (" https://fonts.googleapis.com/css?family=Montserrat|Source+Code+Pro&display=swap" , class= :css ),
51
- ],
52
- ),
53
- sitename = " CausalityTools.jl" ,
54
- authors = " Kristian Agasøster Haaga, David Diego, Tor Einar Møller, George Datseris" ,
55
- pages = PAGES
24
+ Downloads. download (
25
+ " https://raw.githubusercontent.com/JuliaDynamics/doctheme/master/build_docs_with_style.jl" ,
26
+ joinpath (@__DIR__ , " build_docs_with_style.jl" )
56
27
)
28
+ include (" build_docs_with_style.jl" )
57
29
58
- if CI
59
- deploydocs (
60
- repo = " github.com/JuliaDynamics/CausalityTools.jl.git" ,
61
- target = " build" ,
62
- push_preview = true
63
- )
64
- end
30
+ bibliography = CitationBibliography (
31
+ joinpath (@__DIR__ , " refs.bib" );
32
+ style= :authoryear
33
+ )
34
+
35
+ build_docs_with_style (pages, CausalityTools, ComplexityMeasures, StateSpaceSets;
36
+ expandfirst = [" index.md" ],
37
+ bib = bibliography,
38
+ pages = pages,
39
+ authors = " Kristian Agasøster Haaga, David Diego, Tor Einar Møller, George Datseris" ,
40
+ )
0 commit comments