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. 33
      docs/make.jl

2
docs/Manifest.toml

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

33
docs/make.jl

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

Loading…
Cancel
Save