aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-08-05 18:16:10 -0300
committerEuAndreh <eu@euandre.org>2020-08-05 18:16:10 -0300
commitcf27d0a7c60a5bae315e1b21cc1bdc7cf68ed2ff (patch)
tree88b183c8594183cbc9ef1db07e20c7e138bb40b8
parentAdd trailing slash to relative address (diff)
downloadeuandre.org-cf27d0a7c60a5bae315e1b21cc1bdc7cf68ed2ff.tar.gz
euandre.org-cf27d0a7c60a5bae315e1b21cc1bdc7cf68ed2ff.tar.xz
Use tidy to format HTML
More than to lint it :shrug:
Diffstat (limited to '')
-rw-r--r--default.nix3
-rwxr-xr-xscripts/tidy-content.sh2
2 files changed, 3 insertions, 2 deletions
diff --git a/default.nix b/default.nix
index 2f10691..98ac3c3 100644
--- a/default.nix
+++ b/default.nix
@@ -33,7 +33,7 @@ in rec {
});
docs = utils.baseTask.overrideAttrs (baseAttrs: {
name = "${baseAttrs.name}-docs";
- buildInputs = [ jekyllEnv pkgs.html-tidy ];
+ buildInputs = [ jekyllEnv pkgs.html-tidy pkgs.moreutils ];
buildPhase = ''
patchShebangs .
jekyll build -d $out
@@ -59,6 +59,7 @@ in rec {
jekyllEnv
(pkgs.hunspellWithDicts (with pkgs.hunspellDicts; [ en-us ]))
pkgs.html-tidy
+ pkgs.moreutils
];
};
publishScript = utils.overwritingPublishScript {
diff --git a/scripts/tidy-content.sh b/scripts/tidy-content.sh
index 6dc13c6..14e2edc 100755
--- a/scripts/tidy-content.sh
+++ b/scripts/tidy-content.sh
@@ -27,7 +27,7 @@ INPUT_DIR="${1:-}"
format() {
echo "${1}" >&2
- tidy --quiet yes -utf8 -indent -modify "${1}"
+ tidy --quiet yes -utf8 -indent <(tidy --quiet yes -utf8 -indent "${1}") | sponge "${1}"
}
export -f format