42 lines
977 B
Makefile
42 lines
977 B
Makefile
# -------- Config --------
|
|
SHELL := /bin/sh
|
|
|
|
ZOLA ?= zola
|
|
BIOME ?= npx biome
|
|
|
|
BUILD_DIR := public
|
|
|
|
# -------- Targets --------
|
|
.PHONY: help serve build clean format lint fix fix-unsafe check ci
|
|
|
|
help: ## Show this help
|
|
@awk 'BEGIN{FS":.*##"; printf "\nTargets:\n"} /^[a-zA-Z0-9_.-]+:.*##/{printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST); echo
|
|
|
|
serve: ## Run Zola dev server (http://127.0.0.1:1111)
|
|
$(ZOLA) serve
|
|
|
|
build: ## Build site into ./public
|
|
$(ZOLA) build
|
|
|
|
clean: ## Remove ./public
|
|
rm -rf "$(BUILD_DIR)"
|
|
|
|
format: ## Format JS/JSON/CSS with Biome (no linting)
|
|
$(BIOME) format --write .
|
|
|
|
lint: ## Lint with Biome (no writes)
|
|
$(BIOME) ci .
|
|
|
|
fix: ## Lint+auto-fix safe changes with Biome
|
|
$(BIOME) check --write .
|
|
|
|
fix-unsafe: ## Lint+auto-fix incl. unsafe (e.g., template literals)
|
|
$(BIOME) check --write --unsafe .
|
|
|
|
check: ## Zola link/content checks
|
|
$(ZOLA) check
|
|
|
|
ci: ## CI-friendly: lint (Biome) + Zola checks
|
|
$(BIOME) ci . && $(ZOLA) check
|
|
|