mirror of
https://github.com/SuperSandro2000/nixos-modules.git
synced 2024-06-17 13:25:28 +02:00
doc: fix book.toml not being used, make linkcheck optional
This commit is contained in:
parent
63ad42397e
commit
d4fa574715
|
@ -1,9 +1,10 @@
|
||||||
[book]
|
[book]
|
||||||
title="@projectName@"
|
title = "@projectName@"
|
||||||
|
|
||||||
[output.html.print]
|
[output.html.print]
|
||||||
enable = false # don't encourage people to create more dead trees
|
enable = false # don't encourage people to create more dead trees
|
||||||
|
|
||||||
[output.linkcheck]
|
[output.linkcheck]
|
||||||
|
optional = true
|
||||||
follow-web-links = true
|
follow-web-links = true
|
||||||
warning-policy = "error"
|
warning-policy = "error"
|
||||||
|
|
|
@ -27,17 +27,14 @@
|
||||||
|
|
||||||
mkMdBook = { projectName, moduleDoc }: with pkgs; stdenv.mkDerivation {
|
mkMdBook = { projectName, moduleDoc }: with pkgs; stdenv.mkDerivation {
|
||||||
name = "${projectName}-docs";
|
name = "${projectName}-docs";
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [ mdbook ];
|
||||||
mdbook
|
|
||||||
# mdbook-linkcheck # obiously doesn't work in sandbox
|
|
||||||
];
|
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
mkdir src
|
mkdir src
|
||||||
|
|
||||||
cp ${pkgs.substituteAll {
|
cp ${pkgs.substituteAll {
|
||||||
src = ./book.toml;
|
src = ./book.toml;
|
||||||
inherit projectName;
|
inherit projectName;
|
||||||
}} src/book.toml
|
}} book.toml
|
||||||
echo -e "# Summary\n\n- [Options](options.md)" > src/SUMMARY.md
|
echo -e "# Summary\n\n- [Options](options.md)" > src/SUMMARY.md
|
||||||
ln -s ${moduleDoc}/options.md ./src
|
ln -s ${moduleDoc}/options.md ./src
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user