CalculusWithJuliaNotes.jl/docs/make.jl

66 lines
1.5 KiB
Julia
Raw Normal View History

2022-05-24 19:51:49 +02:00
using Documenter
using ArgParse
using CalculusWithJuliaNotes
2022-05-28 13:14:56 +02:00
2022-05-24 19:51:49 +02:00
include("weave-support.jl")
include("markdown-to-pluto.jl")
## The command line gathers
## folder[=nothing], file[=nothing], target[=html], force[=false]
function parse_commandline()
s = ArgParseSettings()
@add_arg_table! s begin
"--folder", "-F"
help = "Input folder name"
default = nothing
"--file", "-f"
help = "Input file name"
default = nothing
"--target", "-o"
help="target type: html, weave_html, ipynb, "
default = "html"
"--force"
help = "Force compliation"
default = "false"
end
return parse_args(s)
end
# build pages
d = parse_commandline()
folder, file = d["folder"], d["file"]
target = Symbol(d["target"])
force = parse(Bool, d["force"])
if isnothing(folder) && isnothing(file)
2022-05-26 01:16:51 +02:00
# keep it simple for now; uncomment above once build goes through
2022-05-28 13:14:56 +02:00
#build_all(force)
2022-05-27 13:40:52 +02:00
build_pages("precalc", nothing, :html, force)
2022-05-26 01:16:51 +02:00
2022-05-28 13:14:56 +02:00
#build_toc()
2022-05-26 01:16:51 +02:00
2022-05-24 19:51:49 +02:00
else
2022-05-28 13:14:56 +02:00
build_pages(folder, file, :html, force)
2022-05-24 19:51:49 +02:00
end
# Documenter can also automatically deploy documentation to gh-pages.
# See "Hosting Documentation" and deploydocs() in the Documenter manual
# for more information.
# Documenter can also automatically deploy documentation to gh-pages.
# See "Hosting Documentation" and deploydocs() in the Documenter manual
# for more information.
2022-05-26 01:16:51 +02:00
Documenter.deploydocs(;
repo = "github.com/jverzani/CalculusWithJuliaNotes.jl",
push_preview=true
2022-05-24 19:51:49 +02:00
)