working on bulid
This commit is contained in:
22
docs/make.jl
22
docs/make.jl
@@ -58,20 +58,20 @@ force = parse(Bool, d["force"])
|
||||
|
||||
|
||||
if isnothing(folder) && isnothing(file)
|
||||
# # build full thing
|
||||
# build full thing
|
||||
# for folder ∈ ("precalc", "limits", "derivatives", "integrals", "ODEs",
|
||||
# "differentiable_vector_calculus", "integral_vector_calculus")
|
||||
# "differentiable_vector_calculus", "integral_vector_calculus",
|
||||
# "misc")
|
||||
# build_pages(folder, nothing, target, force)
|
||||
# end
|
||||
# # alternatives needs work
|
||||
# build_pages("alternatives", "plotly_plotting", "html", force)
|
||||
|
||||
|
||||
# # others need to integrate with Pluto
|
||||
# for folder ∈ ("alternatives", "misc")
|
||||
# build_pages(folder, nothing, "weave_html", force)
|
||||
# end
|
||||
# keep it simple for now; uncomment above once build goes through
|
||||
build_pages("precalc", "functions", "html", true)
|
||||
build_pages("misc", nothing, "weave_html", true)
|
||||
|
||||
build_toc()
|
||||
|
||||
else
|
||||
build_pages(folder, file, target, force)
|
||||
end
|
||||
@@ -86,7 +86,7 @@ end
|
||||
# Documenter can also automatically deploy documentation to gh-pages.
|
||||
# See "Hosting Documentation" and deploydocs() in the Documenter manual
|
||||
# for more information.
|
||||
|
||||
Documenter.deploydocs(
|
||||
repo = "github.com/jverzani/CalculusWithJuliaNotes.jl"
|
||||
Documenter.deploydocs(;
|
||||
repo = "github.com/jverzani/CalculusWithJuliaNotes.jl",
|
||||
push_preview=true
|
||||
)
|
||||
|
||||
@@ -8,14 +8,37 @@ const htmlfile = joinpath(@__DIR__, "..", "templates", "bootstrap.tpl")
|
||||
const latexfile = joinpath(@__DIR__, "..", "templates", "julia_tex.tpl")
|
||||
|
||||
function build_toc(force=true)
|
||||
infile = joinpath(repo_directory, "CwJ", "misc", "toc.jmd")
|
||||
outfile = joinpath(@__DIR__, "build", "index.html")
|
||||
weave(infile;
|
||||
out_path=outfile,
|
||||
doctype="md2html",
|
||||
fig_ext=".svg",
|
||||
template=htmlfile,
|
||||
fig_path=tempdir())
|
||||
@info "building table of contents"
|
||||
|
||||
jmd_dir = joinpath(repo_directory, "CwJ", "misc")
|
||||
build_dir = joinpath(@__DIR__, "build")
|
||||
|
||||
file = joinpath(jmd_dir, "toc.jmd")
|
||||
|
||||
outfile = joinpath(build_dir, "index.html")
|
||||
|
||||
cd(jmd_dir)
|
||||
|
||||
build_file(file, outfile, force=force) || return nothing
|
||||
|
||||
header = CalculusWithJulia.WeaveSupport.header_cmd
|
||||
#footer = CalculusWithJulia.WeaveSupport.footer_cmd(bnm, folder)
|
||||
html_content = md2html(file,
|
||||
header_cmds=(header,),
|
||||
footer_cmds=()
|
||||
)
|
||||
|
||||
open(outfile, "w") do io
|
||||
write(io, html_content)
|
||||
end
|
||||
|
||||
# to use weave, not pluto
|
||||
# weave(file;
|
||||
# out_path=outfile,
|
||||
# doctype="md2html",
|
||||
# fig_ext=".svg",
|
||||
# template=htmlfile,
|
||||
# fig_path=tempdir())
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user