Mercurial > repos > public > sbplib_julia
changeset 845:b4f542b4f2e4 feature/setup_documenter
Use two folders for local and webserver builds
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 14 Jan 2022 11:56:18 +0100 |
parents | ee0404433fc3 |
children | c9e35f1ca269 |
files | .hgignore Makefile docs/make.jl |
diffstat | 3 files changed, 13 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgignore Fri Jan 14 11:33:25 2022 +0100 +++ b/.hgignore Fri Jan 14 11:56:18 2022 +0100 @@ -1,2 +1,3 @@ syntax: glob docs/build/ +docs/build-local/
--- a/Makefile Fri Jan 14 11:33:25 2022 +0100 +++ b/Makefile Fri Jan 14 11:56:18 2022 +0100 @@ -26,19 +26,19 @@ @echo 'or as shell environment variables.' docs: - $(JULIA) --project=docs docs/make.jl --prettyurls + $(JULIA) --project=docs docs/make.jl --build-dir build --prettyurls localdocs: - $(JULIA) --project=docs docs/make.jl + $(JULIA) --project=docs docs/make.jl --build-dir build-local opendocs: - $(BROWSER) docs/build/index.html + $(BROWSER) docs/build-local/index.html clean: rm -r docs/build + rm -r docs/build-local .PHONY: help docs localdocs opendocs clean # TODO: # Make a real target for docs/build -# Possibly store the local and nonlocal in different build folders
--- a/docs/make.jl Fri Jan 14 11:33:25 2022 +0100 +++ b/docs/make.jl Fri Jan 14 11:56:18 2022 +0100 @@ -16,6 +16,13 @@ prettyurls = false end +if "--build-dir" ∈ ARGS + i = findlast(==("--build-dir"), ARGS) + build = ARGS[i+1] +else + build = "build" +end + pages = [ "index.md", "Submodules" => [ @@ -31,4 +38,4 @@ # This ordering is not respected by @contents. See https://github.com/JuliaDocs/Documenter.jl/issues/936 format=Documenter.HTML(;prettyurls) -makedocs(;sitename, pages, format) +makedocs(;sitename, pages, format, build)