all repos — website @ e3cbf1423db26f2509603922277cfddcd87cbfdb

My website

Format HTML output with prettier
Alan Pearce alan@alanpearce.eu
Sat, 24 Jun 2023 20:13:15 +0200
commit

e3cbf1423db26f2509603922277cfddcd87cbfdb

parent

6d4912537072135740864c88b27ee9fb41834f08

2 files changed, 6 insertions(+), 2 deletions(-)

jump to
M MakefileMakefile
@@ -13,6 +13,9 @@ $(PREFIX):
 	zola build --output-dir $(PREFIX)
 
+format: $(PREFIX)
+	prettier --write --parser html --print-width 200 "$(PREFIX)/**/*.html"
+
 clean:
 	rm -rf ./$(PREFIX)
 
@@ -61,7 +64,7 @@ compress: $(brotli_files) $(gzip_files) $(zstd_files) 
 install: compress
 
-deploy: build compress
+deploy: build format compress
 	rsync --archive --delete public/ pappel.alanpearce.eu:/srv/http/alanpearce.eu
 
-.PHONY: all clean build compress install deploy
+.PHONY: all clean build format compress install deploy
M flake.nixflake.nix
@@ -23,6 +23,7 @@ makeFlags = [ "PREFIX=$(out)" ]; 
             nativeBuildInputs = with pkgs; [
               zola
+              nodePackages_latest.prettier
               fd
               brotli
               gzip