Added a Makefile

This commit is contained in:
2025-10-29 10:54:26 +01:00
parent 7291e2eb38
commit 916dddafaf
2 changed files with 30 additions and 9 deletions

13
.gitignore vendored
View File

@@ -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

26
Makefile Normal file
View File

@@ -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