reference-docs: virtualize the options bundle under docs/options/, like crates/
mara on hyperhive/website#59 ("is this slice 1? i expected the options to fold into the main docs sidebar as well so that you have one all docs tree" / "the same thing already happens: crate readmes get included as well. add the virtual options dir"): apply the exact technique already used for docs/crates/<crate>.md to the nixosOptionsDoc bundle (packages.docs) — project it into the reference-docs tree at docs/options/*.md rather than leaving it a wholly separate flake output options.nix has to fetch and render on its own pipeline. Simpler than the crates/ case: the options bundle is already self-contained CommonMark with no relative doc-links needing rewriting (nixosOptionsDoc's transformOptions already points every option declaration at an absolute forge URL), so this is a straight recursive copy, not a per-file sed pass. website's docs.nix needs no changes to pick this up — its sidebar walk is already generic over subdirectories, same reason the earlier crates/ virtualization needed none. The website-side follow-up (has docs.nix render these instead of options.nix's separate pipeline, and what that means for the current /options/ URL) is a separate change on that repo, not touched here.
This commit is contained in:
parent
03d1552746
commit
5dce46830d
2 changed files with 23 additions and 20 deletions
|
|
@ -221,11 +221,14 @@ in
|
|||
# agents read it in-container (added as a claude additional
|
||||
# directory) and the website repo reuses it as a flake input,
|
||||
# neither of which needs the branding/prompt assets. See
|
||||
# ./reference-docs.nix. (`docs` below is the auto-generated
|
||||
# nix-options reference, a different artifact.) `self` is needed to
|
||||
# read each workspace crate's own README.md into the virtual
|
||||
# `crates/` subdir.
|
||||
reference-docs = pkgs.callPackage ./reference-docs.nix { inherit self; };
|
||||
# ./reference-docs.nix. `self` is needed to read each workspace
|
||||
# crate's own README.md into the virtual `crates/` subdir;
|
||||
# `docsAttrs.bundle` (the same tree `docs` below exposes standalone)
|
||||
# is projected into the virtual `options/` subdir the same way.
|
||||
reference-docs = pkgs.callPackage ./reference-docs.nix {
|
||||
inherit self;
|
||||
optionsMd = docsAttrs.bundle;
|
||||
};
|
||||
# XDG icon set + .desktop entries for hyperhive processes.
|
||||
# Narrow input: only the branding SVG, so unrelated source changes
|
||||
# don't bust this derivation's cache.
|
||||
|
|
|
|||
Loading…
Reference in a new issue