General tools to generate documentation in the different PlantingSpace repositories.
It contains 4 main functions:
build_pluto
: given a folder build all Pluto notebooks usingPlutoSliderServer.jl
and process them to make themDocumenter
compatible.build_literate
: similar tobuild_pluto
but forLiterate.jl
files.default_makedocs
: opinionated version ofmakedocs
with given defaults and other.is_mainCI
: check for Gitlab CI to see if it is run onmaster/main
or on a MR.
A typical make.jl
file looks like:
using DocTools
pluto_pages = build_pluto(DocTools, "pluto_notebooks")
literate_pages = build_literate(DocTools, "literate_notebooks")
default_makedocs(;
sitename="Doctools.jl",
modules=[DocTools],
authors="PlantingSpace",
repo="https://github.com/plantingspace/doctools/-/blob/{commit}{path}#{line}",
macros=Dict(:ps => ["{PlantingSpace}"], :Lc => ["\\mathcal{L}"]),
notebooks=[pluto_pages; literate_pages],
pages=["Home" => "index.md"],
editlink="main",
)