Added a Makefile
This commit is contained in:
13
.gitignore
vendored
13
.gitignore
vendored
@@ -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
26
Makefile
Normal 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
|
||||
Reference in New Issue
Block a user