docs: refactor
This commit is contained in:
parent
0d28f2b671
commit
f83732c8cc
2 changed files with 34 additions and 31 deletions
63
dev/docs.nix
63
dev/docs.nix
|
@ -1,35 +1,38 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
devShells.mkdocs = pkgs.mkShellNoCC { inputsFrom = [ config.packages.docs ]; };
|
||||
packages = {
|
||||
docs =
|
||||
pkgs.runCommand "docs"
|
||||
{
|
||||
buildInputs = [
|
||||
pkgs.python3.pkgs.mkdocs-material
|
||||
pkgs.python3.pkgs.mkdocs-material.optional-dependencies.recommended
|
||||
];
|
||||
files = pkgs.lib.fileset.toSource {
|
||||
root = ../.;
|
||||
fileset = pkgs.lib.fileset.unions [
|
||||
../docs
|
||||
../mkdocs.yml
|
||||
];
|
||||
perSystem =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
devShells.mkdocs = pkgs.mkShellNoCC { inputsFrom = [ config.packages.docs ]; };
|
||||
packages = {
|
||||
docs =
|
||||
pkgs.runCommand "docs"
|
||||
{
|
||||
buildInputs = [
|
||||
pkgs.python3.pkgs.mkdocs-material
|
||||
pkgs.python3.pkgs.mkdocs-material.optional-dependencies.recommended
|
||||
];
|
||||
files = pkgs.lib.fileset.toSource {
|
||||
root = ../.;
|
||||
fileset = pkgs.lib.fileset.unions [
|
||||
../docs
|
||||
../mkdocs.yml
|
||||
];
|
||||
};
|
||||
}
|
||||
''
|
||||
cd $files
|
||||
mkdocs build --strict --site-dir $out
|
||||
'';
|
||||
docs-linkcheck = pkgs.testers.lycheeLinkCheck rec {
|
||||
extraConfig = {
|
||||
include_mail = true;
|
||||
include_verbatim = true;
|
||||
};
|
||||
}
|
||||
''
|
||||
cd $files
|
||||
mkdocs build --strict --site-dir $out
|
||||
'';
|
||||
docs-linkcheck = pkgs.testers.lycheeLinkCheck rec {
|
||||
extraConfig = {
|
||||
include_mail = true;
|
||||
include_verbatim = true;
|
||||
remap = {
|
||||
"https://nix-community.org" = site;
|
||||
};
|
||||
site = config.packages.docs;
|
||||
};
|
||||
};
|
||||
remap = {
|
||||
"https://nix-community.org" = site;
|
||||
};
|
||||
site = config.packages.docs;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
systems = import inputs.systems;
|
||||
|
||||
imports = [
|
||||
./dev/docs.nix
|
||||
./dev/effect-deploy.nix
|
||||
./modules
|
||||
inputs.hercules-ci-effects.flakeModule
|
||||
|
@ -107,7 +108,6 @@
|
|||
}:
|
||||
{
|
||||
imports = [
|
||||
./dev/docs.nix
|
||||
./dev/shell.nix
|
||||
./terraform/shell.nix
|
||||
];
|
||||
|
|
Loading…
Add table
Reference in a new issue