doc: fix book.toml not being used, make linkcheck optional

This commit is contained in:
Sandro - 2024-01-08 19:11:59 +01:00
parent 63ad42397e
commit d4fa574715
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
2 changed files with 4 additions and 6 deletions

View File

@ -1,9 +1,10 @@
[book]
title="@projectName@"
title = "@projectName@"
[output.html.print]
enable = false # don't encourage people to create more dead trees
[output.linkcheck]
optional = true
follow-web-links = true
warning-policy = "error"

View File

@ -27,17 +27,14 @@
mkMdBook = { projectName, moduleDoc }: with pkgs; stdenv.mkDerivation {
name = "${projectName}-docs";
nativeBuildInputs = [
mdbook
# mdbook-linkcheck # obiously doesn't work in sandbox
];
nativeBuildInputs = [ mdbook ];
buildCommand = ''
mkdir src
cp ${pkgs.substituteAll {
src = ./book.toml;
inherit projectName;
}} src/book.toml
}} book.toml
echo -e "# Summary\n\n- [Options](options.md)" > src/SUMMARY.md
ln -s ${moduleDoc}/options.md ./src