aboutsummaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-02-14 23:09:21 -0300
committerEuAndreh <eu@euandre.org>2020-02-14 23:09:21 -0300
commit59d41b136edcc728499c4bd2da3a010e34581d3f (patch)
treef55e6c8224dfc7ac0cce6e2b1d9fc85ef44c3bf7 /default.nix
parent.build.yml: Don't publish when not on master branch (diff)
parentImprove error message of tidy-content.sh (diff)
downloadeuandre.org-59d41b136edcc728499c4bd2da3a010e34581d3f.tar.gz
euandre.org-59d41b136edcc728499c4bd2da3a010e34581d3f.tar.xz
Merge branch 'tidy'
Add HTML linting and identing validation step.
Diffstat (limited to '')
-rw-r--r--default.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/default.nix b/default.nix
index c664429..2f10691 100644
--- a/default.nix
+++ b/default.nix
@@ -33,9 +33,15 @@ in rec {
});
docs = utils.baseTask.overrideAttrs (baseAttrs: {
name = "${baseAttrs.name}-docs";
- buildInputs = [ jekyllEnv ];
+ buildInputs = [ jekyllEnv pkgs.html-tidy ];
buildPhase = ''
+ patchShebangs .
jekyll build -d $out
+ ./scripts/tidy-content.sh $out || {
+ echo 'Error in formatting HTML. Reproduce with: '
+ echo ' jekyll build && ./scripts/tidy-content.sh _site/'
+ exit 1
+ }
'';
});
};
@@ -45,12 +51,14 @@ in rec {
(utils.fixme null)
subtasks.hunspellCheck
subtasks.assertContent
+ subtasks.docs
];
shell = pkgs.mkShell rec {
name = "website-shell";
buildInputs = [
jekyllEnv
(pkgs.hunspellWithDicts (with pkgs.hunspellDicts; [ en-us ]))
+ pkgs.html-tidy
];
};
publishScript = utils.overwritingPublishScript {