-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (45 loc) · 1.44 KB
/
Makefile
File metadata and controls
55 lines (45 loc) · 1.44 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Capa.io Makefile
# Simplified build commands for Hugo documentation site
.PHONY: dev build clean deploy help submodule
# Default target
.DEFAULT_GOAL := help
# Initialize git submodules (required for Docsy theme)
submodule:
git submodule update --init --recursive
# Development server with drafts
dev:
hugo server -D
# Development server binding to all interfaces
dev-all:
hugo server -D --bind 0.0.0.0
# Production build
build:
HUGO_ENV="production" hugo --gc --minify
# Clean build artifacts
clean:
rm -rf docs/
rm -rf public/
rm -rf resources/
# Deploy to GitHub Pages (builds and commits docs folder)
deploy: build
git add docs/
git commit -m "Update documentation - $(shell date +%Y-%m-%d-%H:%M:%S)"
git push origin master
# Check for broken links
link-check:
hugo server &
sleep 3
npx linkinator http://localhost:1313 --recurse --timeout 10000 || true
pkill -f "hugo server"
# Show help
help:
@echo "Capa.io Documentation - Available Commands:"
@echo ""
@echo " make submodule - Initialize git submodules (Docsy theme)"
@echo " make dev - Run development server with drafts"
@echo " make dev-all - Run dev server binding to all interfaces"
@echo " make build - Build production site (outputs to docs/)"
@echo " make clean - Remove build artifacts"
@echo " make deploy - Build and deploy to GitHub Pages"
@echo " make link-check - Check for broken links"
@echo " make help - Show this help message"