-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from cecoeco/main
docs
- Loading branch information
Showing
5 changed files
with
41 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
using Documenter, DocumenterMarkdown, Literate | ||
|
||
get_example_path(p) = joinpath(@__DIR__, ".", "examples", p) | ||
OUTPUT = joinpath(@__DIR__, "src", "examples", "generated") | ||
|
||
folders = readdir(joinpath(@__DIR__, ".", "examples")) | ||
function get_example_path(p) | ||
return joinpath(@__DIR__, ".", "examples", p) | ||
end | ||
|
||
function getfiles() | ||
srcsfiles = [] | ||
for f in folders | ||
names = readdir(joinpath(@__DIR__, ".", "examples", f)) | ||
fpaths = "$(f)/" .* names | ||
for folder in readdir(joinpath(@__DIR__, ".", "examples")) | ||
names = readdir(joinpath(@__DIR__, ".", "examples", folder)) | ||
fpaths = "$(folder)/" .* names | ||
srcsfiles = vcat(srcsfiles, fpaths...) | ||
end | ||
|
||
return srcsfiles | ||
end | ||
|
||
srcsfiles = getfiles() | ||
|
||
for (d, paths) in (("tutorial", srcsfiles),) | ||
for p in paths | ||
Literate.markdown(get_example_path(p), joinpath(OUTPUT, dirname(p)); | ||
documenter=true) | ||
for (d, paths) in ("tutorial", getfiles()) | ||
for path in paths | ||
Literate.markdown( | ||
get_example_path(path), | ||
joinpath(@__DIR__, "src", "examples", "generated", dirname(path)), | ||
documenter=true | ||
) | ||
end | ||
end |
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