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.jland process them to make themDocumentercompatible.build_literate: similar tobuild_plutobut forLiterate.jlfiles.default_makedocs: opinionated version ofmakedocswith given defaults and other.is_mainCI: check for Gitlab CI to see if it is run onmaster/mainor 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",
)