Browse Source

jfkdsl

pull/75/head
Fredrik Ekre 6 years ago
parent
commit
4128610fb3
  1. 82
      docs/make.jl

82
docs/make.jl

@ -1,54 +1,54 @@
using Documenter using Documenter
using Literate using Literate
# using Plots # to not capture precompilation output using Plots # to not capture precompilation output
# # generate examples # generate examples
# EXAMPLE = joinpath(@__DIR__, "..", "examples", "example.jl") EXAMPLE = joinpath(@__DIR__, "..", "examples", "example.jl")
# OUTPUT = joinpath(@__DIR__, "src/generated") OUTPUT = joinpath(@__DIR__, "src/generated")
# function preprocess(str) function preprocess(str)
# str = replace(str, "MYVARIABLE" => "z") str = replace(str, "MYVARIABLE" => "z")
# str = replace(str, "MYVALUE" => "1.0 + 2.0im") str = replace(str, "MYVALUE" => "1.0 + 2.0im")
# return str return str
# end end
# Literate.markdown(EXAMPLE, OUTPUT, preprocess = preprocess) Literate.markdown(EXAMPLE, OUTPUT, preprocess = preprocess)
# Literate.notebook(EXAMPLE, OUTPUT, preprocess = preprocess) Literate.notebook(EXAMPLE, OUTPUT, preprocess = preprocess)
# Literate.script(EXAMPLE, OUTPUT, preprocess = preprocess) Literate.script(EXAMPLE, OUTPUT, preprocess = preprocess)
# # generate the example notebook for the documentation, keep in sync with outputformats.md # generate the example notebook for the documentation, keep in sync with outputformats.md
# Literate.markdown(joinpath(@__DIR__, "src/outputformats.jl"), OUTPUT; credit = false, name = "name") Literate.markdown(joinpath(@__DIR__, "src/outputformats.jl"), OUTPUT; credit = false, name = "name")
# 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", "") travis_tag = get(ENV, "TRAVIS_TAG", "")
# folder = isempty(travis_tag) ? "latest" : travis_tag folder = isempty(travis_tag) ? "latest" : travis_tag
# url = "https://nbviewer.jupyter.org/github/fredrikekre/Literate.jl/blob/gh-pages/$(folder)/" url = "https://nbviewer.jupyter.org/github/fredrikekre/Literate.jl/blob/gh-pages/$(folder)/"
# if get(ENV, "HAS_JOSH_K_SEAL_OF_APPROVAL", "") == "true" if get(ENV, "HAS_JOSH_K_SEAL_OF_APPROVAL", "") == "true"
# str = read(joinpath(@__DIR__, "src/outputformats.md"), String) str = read(joinpath(@__DIR__, "src/outputformats.md"), String)
# str = replace(str, "[notebook.ipynb](generated/notebook.ipynb)." => "[notebook.ipynb]($(url)generated/notebook.ipynb).") str = replace(str, "[notebook.ipynb](generated/notebook.ipynb)." => "[notebook.ipynb]($(url)generated/notebook.ipynb).")
# write(joinpath(@__DIR__, "src/outputformats.md"), str) write(joinpath(@__DIR__, "src/outputformats.md"), str)
# end end
# makedocs( makedocs(
# format = Documenter.HTML( format = Documenter.HTML(
# prettyurls = get(ENV, "CI", nothing) == "true", prettyurls = get(ENV, "CI", nothing) == "true",
# assets = ["assets/custom.css"], assets = ["assets/custom.css"],
# ), ),
# modules = [Literate], modules = [Literate],
# sitename = "Literate.jl", sitename = "Literate.jl",
# pages = Any[ pages = Any[
# "index.md", "index.md",
# "fileformat.md", "fileformat.md",
# "pipeline.md", "pipeline.md",
# "outputformats.md", "outputformats.md",
# "customprocessing.md", "customprocessing.md",
# "documenter.md", "documenter.md",
# "generated/example.md"] "generated/example.md"]
# ) )
############################################ ############################################
# Set up for pushing preview docs from PRs # # Set up for pushing preview docs from PRs #

Loading…
Cancel
Save