Skip to content

Commit

Permalink
Switch docs execution from Literate to Documenter (#97)
Browse files Browse the repository at this point in the history
* Switch docs execution from Literate to Documenter

---------

Co-authored-by: Kipton Barros <[email protected]>
  • Loading branch information
Lazersmoke and kbarros authored Jul 19, 2023
1 parent 3c24157 commit d507686
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ using Literate, Documenter, Sunny
import DynamicPolynomials # get symbolic functions
import GLMakie # get plotting functions

execute = true # set `false` to disable cell evaluation
draft = false # set `true` to disable cell evaluation

example_names = ["fei2_tutorial", "powder_averaging", "ising2d", "binning_tutorial"]
example_sources = [joinpath(@__DIR__, "..", "examples", name*".jl") for name in example_names]
example_destination = joinpath(@__DIR__, "src", "examples")
example_doc_paths = ["examples/$name.md" for name in example_names]

for source in example_sources
Literate.markdown(source, example_destination; execute, documenter=true)
Literate.markdown(source, example_destination)
end

makedocs(
Expand All @@ -27,9 +27,10 @@ makedocs(
"Version History" => "versions.md",
],
format = Documenter.HTML(
prettyurls = get(ENV, "CI", nothing) == "true"
),
draft=!execute
prettyurls = get(ENV, "CI", nothing) == "true",
ansicolor = true
);
draft
)

deploydocs(
Expand Down

0 comments on commit d507686

Please sign in to comment.