mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-19 21:38:07 -04:00
refactor(docs): switch to nixos-render-docs for nix options generation
- Use nixos-render-docs commonmark as the rendering engine - Add GitHub source links (Declared by) for each option - Fix installation.md links pointing to /docs/nix-module -> /docs/nix-options
This commit is contained in:
parent
0b39255831
commit
d7c5b603eb
5 changed files with 380 additions and 193 deletions
18
.github/workflows/generate-nix-options-docs.yml
vendored
18
.github/workflows/generate-nix-options-docs.yml
vendored
|
|
@ -34,11 +34,25 @@ jobs:
|
|||
nix build .#nixos-options-json --out-link result-nixos
|
||||
nix build .#hm-options-json --out-link result-hm
|
||||
|
||||
- name: Render to CommonMark
|
||||
run: |
|
||||
echo '{}' > /tmp/manpage-urls.json
|
||||
nix run nixpkgs#nixos-render-docs -- options commonmark \
|
||||
--manpage-urls /tmp/manpage-urls.json \
|
||||
--revision nightly \
|
||||
result-nixos/share/doc/nixos/options.json \
|
||||
/tmp/nixos-raw.md
|
||||
nix run nixpkgs#nixos-render-docs -- options commonmark \
|
||||
--manpage-urls /tmp/manpage-urls.json \
|
||||
--revision nightly \
|
||||
result-hm/share/doc/nixos/options.json \
|
||||
/tmp/hm-raw.md
|
||||
|
||||
- name: Format to Markdown
|
||||
run: |
|
||||
python3 ./.github/scripts/generate-nix-options-docs.py \
|
||||
result-nixos/share/doc/nixos/options.json \
|
||||
result-hm/share/doc/nixos/options.json \
|
||||
/tmp/nixos-raw.md \
|
||||
/tmp/hm-raw.md \
|
||||
docs/nix-options.md
|
||||
|
||||
- name: Auto-commit changes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue