Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Manifest.toml and append package version at the end of the examples #97

Merged
merged 18 commits into from
Jan 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ tmp/
*.jld2
*.cov
*.info
/test/Manifest.toml
/Manifest.toml
Manifest.toml
theogf marked this conversation as resolved.
Show resolved Hide resolved
14 changes: 12 additions & 2 deletions docs/literate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ using Pkg: Pkg
const EXAMPLEPATH = joinpath(@__DIR__, "..", "examples", EXAMPLE)
Pkg.activate(EXAMPLEPATH)
Pkg.instantiate()
io = IOBuffer()
Pkg.status(;io=io)
theogf marked this conversation as resolved.
Show resolved Hide resolved
pkg_status = String(take!(io))

using Literate: Literate

function preprocess(content)
Expand Down Expand Up @@ -39,8 +43,14 @@ function preprocess(content)

# remove VSCode `##` block delimiter lines
content = replace(content, r"^##$."ms => "")

return content
# adds the current version of the packages
append = """
#### Packages Version
theogf marked this conversation as resolved.
Show resolved Hide resolved
```julia
$(pkg_status)
```
"""
return content * append
end

function md_postprocess(content)
Expand Down
Loading