Common Workflows
"I added new Fortran modules"
Just re-run -- FORMAL picks up all modules in the configured source directories:
bash
formal generate"I want to exclude a directory from API docs"
Edit doc/formal.md and add to exclude_dir:
exclude_dir: ../src/third_party/
../src/experimental/ # <-- add here"I want to add a hand-written page"
- Create
docs/my-section/my-page.md - Add to sidebar in
docs/.vitepress/config.mts - Optionally add to nav bar
See Writing Pages for details.
"I want to change the landing page"
Edit docs/index.md. The hero section uses YAML frontmatter -- see VitePress home layout.
"I want to regenerate only when sources change"
Use file watching or a Makefile:
makefile
docs/api/_sidebar.json: $(wildcard src/**/*.F90) doc/formal.md
formal generate --quietOr integrate with your build system.