Skip to content

Commit

Permalink
Create @id automatically from filename for each tutorial, replaced ab…
Browse files Browse the repository at this point in the history
…solute links by relative (@ref)
  • Loading branch information
AlexandreMagueresse committed Apr 15, 2024
1 parent 25cb529 commit ce2a2ad
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 136 deletions.
3 changes: 2 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ nbviwer_logo = "https://img.shields.io/badge/show-nbviewer-579ACA.svg"
for (i,(title,filename)) in enumerate(Tutorials.files)
# Generate strings
tutorial_prefix = string("t",@sprintf "%03d_" i)
tutorial_title = string("# # Tutorial ", i, ": ", title)
tutorial_id = replace(filename, " " => "_")
tutorial_title = string("# # [Tutorial ", i, ": ", title, "](@id ", tutorial_id, ")")
tutorial_file = string(tutorial_prefix,splitext(filename)[1])
notebook_filename = string(tutorial_file, ".ipynb")
binder_url = joinpath("@__BINDER_ROOT_URL__","notebooks", notebook_filename)
Expand Down
Loading

0 comments on commit ce2a2ad

Please sign in to comment.