From 6340b8ba5080f9cf1860ba269d55205f872550af Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Mon, 7 Mar 2022 22:02:04 -0800 Subject: [PATCH] manual: Integrate mdbook-linkcheck --- flake.nix | 7 +++++-- manual/book.stable.toml | 3 +++ manual/book.toml | 3 +++ manual/default.nix | 4 ++-- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index a906243..d6ab1db 100644 --- a/flake.nix +++ b/flake.nix @@ -56,8 +56,11 @@ }; devShell = pkgs.mkShell { - inputsFrom = [ defaultPackage ]; - packages = with pkgs; [ clippy mdbook python3 editorconfig-checker rust-analyzer cargo-outdated ]; + inputsFrom = [ defaultPackage packages.manualFast ]; + packages = with pkgs; [ + python3 editorconfig-checker + clippy rust-analyzer cargo-outdated + ]; shellHook = '' export NIX_PATH=nixpkgs=${pkgs.path} ''; diff --git a/manual/book.stable.toml b/manual/book.stable.toml index b63d8dc..294c987 100644 --- a/manual/book.stable.toml +++ b/manual/book.stable.toml @@ -10,6 +10,9 @@ site-url = "/colmena/@apiVersion@/" git-repository-url = "https://github.com/zhaofengli/colmena" edit-url-template = "https://github.com/zhaofengli/colmena/edit/main/manual/{path}" +[output.linkcheck] +follow-web-links = false + [preprocessor.colmena] command = "python3 preprocess.py" renderer = [ "html", "epub" ] diff --git a/manual/book.toml b/manual/book.toml index ae312f7..24f9f96 100644 --- a/manual/book.toml +++ b/manual/book.toml @@ -10,6 +10,9 @@ site-url = "/colmena/unstable/" git-repository-url = "https://github.com/zhaofengli/colmena" edit-url-template = "https://github.com/zhaofengli/colmena/edit/main/manual/{path}" +[output.linkcheck] +follow-web-links = false + [preprocessor.colmena] command = "python3 preprocess.py" renderer = [ "html", "epub" ] diff --git a/manual/default.nix b/manual/default.nix index 08de9fc..6156a90 100644 --- a/manual/default.nix +++ b/manual/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, nix-gitignore, mdbook, python3, callPackage, writeScript +{ lib, stdenv, nix-gitignore, mdbook, mdbook-linkcheck, python3, callPackage, writeScript , deploymentOptionsMd ? null , metaOptionsMd ? null , colmena ? null @@ -40,7 +40,7 @@ in stdenv.mkDerivation { src = nix-gitignore.gitignoreSource [] ./.; - nativeBuildInputs = [ mdbook python3 ]; + nativeBuildInputs = [ mdbook mdbook-linkcheck python3 ]; outputs = [ "out" "redirectFarm" ];