Skip to content

Commit

Permalink
Fix notebook paths
Browse files Browse the repository at this point in the history
  • Loading branch information
moyner committed Sep 24, 2024
1 parent f438f3d commit 1898abf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@ function build_jutul_darcy_docs(build_format = nothing; build_examples = true, b
end
end
example_path(pth) = joinpath(jutul_dir, "examples", "$pth.jl")
out_dir = joinpath(@__DIR__, "src", "examples")
notebook_dir = joinpath(@__DIR__, "build", "notebooks")
if build_notebooks
mkpath(notebook_dir)
end
for (ex, pth) in examples
in_pth = example_path(pth)
out_dir = joinpath(@__DIR__, "build", "notebooks")
mkpath(out_dir)
is_validation = startswith(ex, "Validation:")
is_intro = startswith(ex, "Intro: ")
is_example = !(is_intro || is_validation)
Expand All @@ -82,7 +85,7 @@ function build_jutul_darcy_docs(build_format = nothing; build_examples = true, b
Literate.markdown(in_pth, out_dir, preprocess = upd)
end
if build_notebooks
Literate.notebook(in_pth, out_dir, execute = false)
Literate.notebook(in_pth, notebook_dir, execute = false)
end
end
## Docs
Expand Down

0 comments on commit 1898abf

Please sign in to comment.