doc: add link checking and fix broken links (#1478)

Closes: https://github.com/nix-community/stylix/issues/1474
Link: https://github.com/nix-community/stylix/pull/1478

Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
This commit is contained in:
Shahar "Dawn" Or 2025-06-13 21:26:32 +07:00 committed by GitHub
parent 343938594e
commit c79ad48561
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 5 deletions

View file

@ -3,6 +3,7 @@ title = "Stylix"
language = "en"
[preprocessor.alerts]
renderers = ["html", "linkcheck"]
[output.html]
site-url = "/stylix/"
@ -32,3 +33,8 @@ enable = true
"/options/modules/nixvim.html" = "./neovim.html"
"/options/modules/nvf.html" = "./neovim.html"
"/options/modules/vim.html" = "./neovim.html"
[output.linkcheck]
follow-web-links = false
traverse-parent-directories = false
warning-policy = "error"

View file

@ -10,6 +10,7 @@
stdenvNoCC,
mdbook,
mdbook-alerts,
mdbook-linkcheck,
}:
let
@ -618,6 +619,7 @@ stdenvNoCC.mkDerivation {
buildInputs = [
mdbook
mdbook-alerts
mdbook-linkcheck
];
inherit extraCSS renderedSummary;
@ -636,11 +638,12 @@ stdenvNoCC.mkDerivation {
buildPhase = ''
runHook preBuild
mdbook build --dest-dir $out
mdbook build
runHook postBuild
'';
postBuild = ''
cp --recursive book/html $out
cat $extraCSSPath >>$out/css/general.css
'';
}

View file

@ -187,22 +187,22 @@ theme for each user.
You may prefer to disable inheritance entirely, and set up the Home Manager
version of Stylix yourself if required. Refer to the options
[`stylix.homeManagerIntegration.autoImport`](options/global/nixos.md#stylixhomemanagerintegrationautoimport)
[`stylix.homeManagerIntegration.autoImport`](options/platforms/nixos.md#stylixhomemanagerintegrationautoimport)
and
[`stylix.homeManagerIntegration.followSystem`](options/global/nixos.md#stylixhomemanagerintegrationfollowsystem)
[`stylix.homeManagerIntegration.followSystem`](options/platforms/nixos.md#stylixhomemanagerintegrationfollowsystem)
to customize this.
> [!NOTE]
>
> There is a special case involving the
> [`stylix.base16Scheme`](options/global/nixos.md#stylixbase16scheme)
> [`stylix.base16Scheme`](options/platforms/home_manager.md#stylixbase16scheme)
> option:
>
> If the wallpaper in a Home Manager configuration is changed, then Home Manager
> will stop inheriting the color scheme from NixOS. This allows Home Manager
> configurations to use the automatic palette generator without being overridden.
>
> Similarly, [`stylix.override`](options/global/nixos.md#stylixoverride) is not inherited
> Similarly, [`stylix.override`](options/platforms/home_manager.md#stylixoverride) is not inherited
> if the color scheme is different.
## Turning targets on and off

View file

@ -81,6 +81,7 @@
[Neovim]: https://neovim.io
[Nixvim]: https://github.com/nix-community/nixvim#readme
[NixVim Standalone]: https://nix-community.github.io/nixvim/user-guide/install.html#standalone-usage
[nvf]: https://github.com/NotAShelf/nvf#readme
[Vim]: https://www.vim.org
'';