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.
|
||
|---|---|---|
| .. | ||
| files | ||
| nix-env | ||
| nix-store | ||
| conf-file-prefix.md | ||
| env-common.md | ||
| experimental-commands.md | ||
| files.md | ||
| index.md | ||
| main-commands.md | ||
| meson.build | ||
| nix-build.md | ||
| nix-channel.md | ||
| nix-collect-garbage.md | ||
| nix-copy-closure.md | ||
| nix-daemon.md | ||
| nix-env.md | ||
| nix-hash.md | ||
| nix-instantiate.md | ||
| nix-prefetch-url.md | ||
| nix-shell.md | ||
| nix-store.md | ||
| opt-common.md | ||
| status-build-failure.md | ||
| utilities.md | ||