This directory contains the source files and build scripts for the CTBase.jl documentation.
The documentation is built using Documenter.jl. It features an automated API reference generation system provided by the DocumenterReference extension in CTBase.jl.
There are several ways to build the documentation locally.
From the root of the CTBase.jl repository, run:
julia --project=docs/ -e 'using Pkg; Pkg.develop(path=pwd()); include("docs/make.jl"); Pkg.rm("CTBase")'This command:
- Activates the
docsproject environment. - Temporarily "develops" the current package so changes are reflected in the build.
- Executes
make.jlto build the site. - Cleans up the
docsenvironment by removing the temporary link toCTBase.
If you prefer working inside the Julia REPL:
# 1. Activate the docs project
using Pkg
Pkg.activate("docs/")
# 2. Add CTBase in development mode (if not already done)
Pkg.develop(path=pwd())
# 3. Build the documentation
include("docs/make.jl")After a successful build, the generated HTML files are located in docs/build/. You can open index.html in your browser:
# macOS
open docs/build/index.html
# Linux
xdg-open docs/build/index.htmlsrc/: Contains the manual markdown files (Introduction, Tutorials, etc.).make.jl: The main build script for Documenter.api_reference.jl: Contains the logic for automatic API reference generation. It extracts docstrings from the source code and creates temporary markdown files.build/: The directory where the static website is generated (ignored by git).
The api_reference.jl script uses CTBase.automatic_reference_documentation() to scan the modules.
- It generates public and private API pages for each sub-module.
- These files are created temporarily in
docs/src/during the build process. - The
with_api_reference()wrapper inmake.jlensures these temporary files are deleted after the build.