Skip to content

Commit

Permalink
[docs] move literate footer to header
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Sep 11, 2023
1 parent 8205d4d commit fe7e5cb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,14 @@ function _link_example(content)
"<unknown>" => "https://github.com/jump-dev/JuMP.jl/tree/master",
)
end
return content *
"---\n\n!!! tip\n This tutorial was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl). [View the source `.jl` file on GitHub]($(edit_url)).\n"
title = match(r"\n\# (.+?)\n", content)
new_title = string(
"$(title[1])\n",
"\n",
"_This tutorial was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl)._\n",
"_[Download the source as a `.jl` file]($(edit_url))_.",
)
return replace(content, title[1] => new_title)
end

function _file_list(full_dir, relative_dir, extension)
Expand Down

0 comments on commit fe7e5cb

Please sign in to comment.