mirror of
https://github.com/NixOS/nix.git
synced 2025-12-08 18:11:02 +01:00
Add standalone markdown preprocessor to generate manpages without requiring
mdbook's Rust toolchain. This removes a significant build dependency for
manpage generation while keeping the HTML manual (mdbook) working unchanged.
Changes:
- Add expand-includes.py: Python 3 script that recursively expands
{{#include}} directives, resolves @docroot@ to nix.dev URLs, and handles
@generated@/ paths for build-generated files
- Update render-manpage.sh: Replace mdbook-based implementation with
standalone version that uses expand-includes.py + lowdown
- Update meson.build: All 134 manpage targets now use standalone renderer
with proper dependencies (expand-includes.py, experimental-features-shortlist)
- Fix nix-hash.md: Remove extra parenthesis in markdown link syntax
Benefits:
- No mdbook/Rust toolchain required for manpage builds
- Manpages contain nix.dev/latest URLs instead of broken relative paths
- Fixes bug where mdbook didn't expand experimental-features-shortlist.md
- 98.5% identical output to mdbook (2 files differ, both acceptable)
All 134 manpages (131 section 1, 2 section 5, 1 section 8) build successfully.
|
||
|---|---|---|
| .. | ||
| rl-next | ||
| source | ||
| theme | ||
| .version | ||
| anchors.jq | ||
| book.toml.in | ||
| custom.css | ||
| expand-includes.py | ||
| generate-builtins.nix | ||
| generate-deps.py | ||
| generate-manpage.nix | ||
| generate-redirects.py | ||
| generate-settings.nix | ||
| generate-store-info.nix | ||
| generate-store-types.nix | ||
| generate-xp-features-shortlist.nix | ||
| generate-xp-features.nix | ||
| meson.build | ||
| package.nix | ||
| quote-literals.xsl | ||
| redirect-targets-html.nix | ||
| redirects.js.in | ||
| redirects.json | ||
| remove_before_wrapper.py | ||
| render-manpage.sh | ||
| substitute.py | ||
| utils.nix | ||