-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (30 loc) · 877 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.PHONY: install serve build clean
# Default target
all: install serve
mac_install:
@brew install hugo
# Install Hugo if not present
install:
@if ! command -v hugo > /dev/null; then \
echo "Installing Hugo..."; \
wget -O /tmp/hugo.deb https://github.com/gohugoio/hugo/releases/download/v0.115.4/hugo_extended_0.115.4_linux-amd64.deb; \
sudo dpkg -i /tmp/hugo.deb; \
rm /tmp/hugo.deb; \
fi
# Start Hugo server for local development
serve:
hugo server -D
# Build the site
build:
hugo --gc --minify
# Clean generated files
clean:
rm -rf public/
# Help command
help:
@echo "Available commands:"
@echo " make install - Install Hugo if not present"
@echo " make serve - Start Hugo server for local development"
@echo " make build - Build the site"
@echo " make clean - Remove generated files"
@echo " make help - Show this help message"