From 916dddafaf5675110cd5c4c4ec8d356ff4b58de9 Mon Sep 17 00:00:00 2001 From: Nicola Belluti Date: Wed, 29 Oct 2025 10:54:26 +0100 Subject: [PATCH] Added a Makefile --- .gitignore | 13 ++++--------- Makefile | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 9 deletions(-) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index f5a2157..2945d37 100644 --- a/.gitignore +++ b/.gitignore @@ -3,12 +3,7 @@ public/ .hugo_build.lock # Favicon -android-chrome-192x192.png -android-chrome-512x512.png -apple-touch-icon.png -favicon-16x16.png -favicon-32x32.png -favicon-dark.svg -favicon.ico -favicon.svg -site.webmanifest +static/android-chrome* +static/apple* +static/favicon* +static/site.webmanifest diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..bde470c --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +all: build + +build: clean generate-favicons + @hugo --gc + +serve: + @if ! ls static/android-chrome* static/apple* static/favicon* static/site.webmanifest >/dev/null 2>&1; then \ + echo -e '\033[1;31mSome favicon or manifest files are missing!\033[0m'; \ + echo 'Run "make generate-favicons" to generate them'; \ + sleep 3; \ + fi + + @hugo server --buildDrafts --buildFuture --disableFastRender + +generate-favicons: + @./favicon/generate_favicons.sh + +clean: + @# Remove Hugo dirs + @rm -rf .hugo_build.lock public/ resources/ + + @# Remove favicons + @rm static/android-chrome* \ + static/apple* \ + static/favicon* \ + static/site.webmanifest 2>/dev/null || true