Browse Source

Fix link to notebook in the documentation.

pull/86/head
Fredrik Ekre 6 years ago
parent
commit
f1ca792f5e
  1. 2
      docs/Manifest.toml
  2. 31
      docs/make.jl

2
docs/Manifest.toml

@ -114,7 +114,7 @@ uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" @@ -114,7 +114,7 @@ uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
deps = ["Base64", "JSON", "REPL"]
path = ".."
uuid = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
version = "2.1.1"
version = "2.2.0"
[[Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

31
docs/make.jl

@ -1,5 +1,9 @@ @@ -1,5 +1,9 @@
using Documenter
if haskey(ENV, "GITHUB_ACTIONS")
ENV["JULIA_DEBUG"] = "Documenter"
end
Documenter.post_status(; type="pending", repo="github.com/fredrikekre/Literate.jl.git")
using Literate
using Plots # to not capture precompilation output
@ -23,16 +27,23 @@ Literate.markdown(joinpath(@__DIR__, "src/outputformats.jl"), OUTPUT; credit = f @@ -23,16 +27,23 @@ Literate.markdown(joinpath(@__DIR__, "src/outputformats.jl"), OUTPUT; credit = f
Literate.notebook(joinpath(@__DIR__, "src/outputformats.jl"), OUTPUT; name = "notebook")
Literate.script(joinpath(@__DIR__, "src/outputformats.jl"), OUTPUT; credit = false)
# # replace the link in outputformats.md
# travis_tag = get(ENV, "TRAVIS_TAG", "")
# folder = isempty(travis_tag) ? "latest" : travis_tag
# url = "https://nbviewer.jupyter.org/github/fredrikekre/Literate.jl/blob/gh-pages/$(folder)/"
# if get(ENV, "HAS_JOSH_K_SEAL_OF_APPROVAL", "") == "true"
# str = read(joinpath(@__DIR__, "src/outputformats.md"), String)
# str = replace(str, "[notebook.ipynb](generated/notebook.ipynb)." => "[notebook.ipynb]($(url)generated/notebook.ipynb).")
# write(joinpath(@__DIR__, "src/outputformats.md"), str)
# end
# Replace the link in outputformats.md
# since that page is not "literated"
if haskey(ENV, "GITHUB_ACTIONS")
folder = Base.CoreLogging.with_logger(Base.CoreLogging.NullLogger()) do
Documenter.deploy_folder(
Documenter.auto_detect_deploy_system();
repo = "github.com/fredrikekre/Literate.jl.git",
devbranch = "master",
push_preview = true,
devurl = "dev",
)
end
url = "https://nbviewer.jupyter.org/github/fredrikekre/Literate.jl/blob/gh-pages/$(folder)/"
str = read(joinpath(@__DIR__, "src/outputformats.md"), String)
str = replace(str, "[notebook.ipynb](generated/notebook.ipynb)." => "[notebook.ipynb]($(url)generated/notebook.ipynb).")
write(joinpath(@__DIR__, "src/outputformats.md"), str)
end
makedocs(
format = Documenter.HTML(

Loading…
Cancel
Save