From 3579e7d73d8ed3d6bc44ad06840bfcd3b698d95d Mon Sep 17 00:00:00 2001 From: Emmanuel Lujan Date: Wed, 5 Jun 2024 14:53:46 -0400 Subject: [PATCH] Change in docs/make.jl --- docs/make.jl | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index 843533cf..c6e1095d 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -21,15 +21,20 @@ const EXAMPLES_DIR = joinpath(@__DIR__, "..", "examples") const OUTPUT_DIR = joinpath(@__DIR__, "src/generated") examples = [ - "Subsampling, compute descriptors, and fit ACE" => "Na/fit-dpp-ace-na" + "Compute ACE descriptors, subsample, and fit ACE" => "Na/fit-dpp-ace-na.jl" ] -for (_, name) in examples - example_filepath = joinpath(EXAMPLES_DIR, string(name, ".jl")) - Literate.markdown(example_filepath, OUTPUT_DIR, documenter=true) +for (_, example_path) in examples + s = split(example_path, "/") + sub_path, file_name = string(s[1:end-1]...), s[end] + example_filepath = joinpath(EXAMPLES_DIR, example_path) + Literate.markdown(example_filepath, + joinpath(OUTPUT_DIR, sub_path), + documenter = true) end -examples = [title=>joinpath("generated", string(name, ".md")) for (title, name) in examples] +examples = [title => joinpath("generated", replace(example_path, ".jl" => ".md")) + for (title, example_path) in examples] makedocs(