-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add tutorial to documentation * add literate to docs * theme * remove demo link
- Loading branch information
1 parent
025cf1c
commit bc2ebd2
Showing
5 changed files
with
43 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
using ThreeBodyDecays | ||
using Documenter | ||
using Literate | ||
|
||
DocMeta.setdocmeta!( | ||
ThreeBodyDecays, | ||
|
@@ -10,6 +11,28 @@ DocMeta.setdocmeta!( | |
|
||
const page_rename = Dict("developer.md" => "Developer docs") # Without the numbers | ||
|
||
function fix_literate_output(content) | ||
content = replace(content, "EditURL = \"@__REPO_ROOT_URL__/\"" => "") | ||
return content | ||
end | ||
|
||
docs_src_dir = joinpath(@__DIR__, "src") | ||
# | ||
files = readdir(docs_src_dir) | ||
filter!(file -> splitext(file)[2] == ".jl", files) | ||
map(files) do file | ||
name = splitext(file)[1] | ||
tutorial_src = joinpath(@__DIR__, "src", "$(name).jl") | ||
Literate.markdown( | ||
tutorial_src, | ||
docs_src_dir; | ||
name, | ||
documenter = true, | ||
credit = true, | ||
postprocess = fix_literate_output, | ||
) | ||
end | ||
|
||
makedocs(; | ||
modules = [ThreeBodyDecays], | ||
authors = "Misha Mikhasenko <[email protected]> and contributors", | ||
|
@@ -22,7 +45,7 @@ makedocs(; | |
pages = [ | ||
"index.md" | ||
[ | ||
file for file in readdir(joinpath(@__DIR__, "src")) if | ||
file for file in readdir(docs_src_dir) if | ||
file != "index.md" && splitext(file)[2] == ".md" | ||
] | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters