diff --git a/docs/make.jl b/docs/make.jl index 9ff80bd4..be5a914e 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -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) @@ -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