File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ using Documenter
2
+ using Literate
3
+ using ShallowWaters
4
+
5
+ EXAMPLE = joinpath (@__DIR__ , " assets" , " swm_equations.jl" )
6
+ OUTPUT = joinpath (@__DIR__ , " src" )
7
+
8
+ # Generate markdown
9
+ binder_badge = " # [](https://mybinder.org/v2/gh/milankl/ShallowWaters.jl/gh-pages?labpath=dev%2Fswm_equations.ipynb)"
10
+ function preprocess_docs (content)
11
+ return string (binder_badge, " \n\n " , content)
12
+ end
13
+
14
+ Literate. markdown (EXAMPLE, OUTPUT; preprocess= preprocess_docs, codefence= " ```julia" => " ```" )
15
+ Literate. notebook (EXAMPLE, OUTPUT)
16
+
17
+ pages = [
18
+ " Introduction" => " index.md" ,
19
+ " Tutorial" => " swm_equations.md" ,
20
+ " Reference" => " reference.md" ,
21
+ ]
22
+
23
+ makedocs (
24
+ sitename = " ShallowWaters.jl" ,
25
+ format = Documenter. HTML (prettyurls = get (ENV , " CI" , nothing ) == " true" ),
26
+ modules = [ShallowWaters],
27
+ pages = pages,
28
+ )
29
+
30
+ deploydocs (
31
+ repo = " github.com/milankl/ShallowWaters.jl.git" ,
32
+ push_preview = true ,
33
+ devbranch = " main" ,
34
+ )
You can’t perform that action at this time.
0 commit comments