Skip to content

Commit ce2a2ad

Browse files
Create @id automatically from filename for each tutorial, replaced absolute links by relative (@ref)
1 parent 25cb529 commit ce2a2ad

5 files changed

Lines changed: 132 additions & 136 deletions

File tree

docs/make.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ nbviwer_logo = "https://img.shields.io/badge/show-nbviewer-579ACA.svg"
3232
for (i,(title,filename)) in enumerate(Tutorials.files)
3333
# Generate strings
3434
tutorial_prefix = string("t",@sprintf "%03d_" i)
35-
tutorial_title = string("# # Tutorial ", i, ": ", title)
35+
tutorial_id = replace(filename, " " => "_")
36+
tutorial_title = string("# # [Tutorial ", i, ": ", title, "](@id ", tutorial_id, ")")
3637
tutorial_file = string(tutorial_prefix,splitext(filename)[1])
3738
notebook_filename = string(tutorial_file, ".ipynb")
3839
binder_url = joinpath("@__BINDER_ROOT_URL__","notebooks", notebook_filename)

0 commit comments

Comments
 (0)