Add agent tooling and restore the legal footer links
The footer override at layouts/partials/footer.html stopped being applied when PaperMod moved its partials to layouts/_partials/: the Datenschutz and Impressum links had silently vanished from the live site, and the copied theme JS was stale. Drop the 135-line fork and get the links from params.footer.text, which the theme renders itself. Agentic setup: - AGENTS.md: repo map, writing rules, guardrails, definition of done, backlog - Makefile: dockerised build/serve/check/new/clean, pinned Hugo 0.169.0 - scripts/new-post.sh: creates a correct draft page bundle - scripts/check-links.py: fails on unresolved internal links - .editorconfig for consistent whitespace CI/build: - pin ghcr.io/gohugoio/hugo to v0.169.0 instead of :latest - serialise runs per ref so deploys cannot race - only send the Telegram notification for pushes Also: trailing slash on the howto menu URL, ignore .hugo_build.lock, document the dead Universal Analytics ID, and remove two unused duplicate images (304 KB).
This commit is contained in:
1 parent
94ea700088
commit
9a02ee8111
12 files changed
+320
-139
No files matched your search
@@ -0,0 +1,52 @@
|
||||
# Local build helpers. The Hugo binary is not installed on the host: every
|
||||
# target runs the pinned official image so local and CI builds match.
|
||||
#
|
||||
# Keep HUGO_VERSION in sync with the image tag in .gitea/workflows/build.yml.
|
||||
|
||||
HUGO_VERSION ?= 0.169.0
|
||||
HUGO_IMAGE ?= ghcr.io/gohugoio/hugo:v$(HUGO_VERSION)
|
||||
# --user keeps public/ owned by you instead of root (CI works around this with chmod).
|
||||
DOCKER_RUN = docker run --rm \
|
||||
-u "$(shell id -u):$(shell id -g)" \
|
||||
-e HOME=/tmp \
|
||||
-e HUGO_CACHEDIR=/tmp/hugo-cache \
|
||||
-v "$(CURDIR)":/src \
|
||||
-w /src
|
||||
HUGO = $(DOCKER_RUN) $(HUGO_IMAGE)
|
||||
|
||||
.PHONY: help build serve check new clean theme-update
|
||||
|
||||
help: ## Show this help
|
||||
@grep -hE '^[a-z-]+:.*?## ' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " %-14s %s\n", $$1, $$2}'
|
||||
|
||||
build: ## Build the production site into public/
|
||||
@$(HUGO) --minify --gc --cleanDestinationDir
|
||||
@echo "ok: public/"
|
||||
|
||||
serve: ## Preview on http://localhost:1313 (drafts included)
|
||||
@$(DOCKER_RUN) -p 1313:1313 $(HUGO_IMAGE) server --bind 0.0.0.0 --port 1313 --buildDrafts --navigateToChanged
|
||||
|
||||
check: build ## Build, then verify the generated site
|
||||
@test -f public/index.html
|
||||
@test -f public/sitemap.xml
|
||||
@test -f public/robots.txt
|
||||
@test -f public/index.xml
|
||||
@! grep -rl "Lorem Ipsum\|dolor sit amet" public --include='*.html' \
|
||||
|| { echo "FAIL: placeholder text found in public/"; exit 1; }
|
||||
@! grep -rl "localhost:1313" public --include='*.html' \
|
||||
|| { echo "FAIL: dev baseURL leaked into public/"; exit 1; }
|
||||
@python3 scripts/check-links.py public
|
||||
@echo "ok: site checks passed"
|
||||
|
||||
new: ## Create a draft post: make new slug=my-post title="My title"
|
||||
@test -n "$(slug)" || { echo 'usage: make new slug=my-post [title="My title"]'; exit 2; }
|
||||
@scripts/new-post.sh "$(slug)" "$(title)"
|
||||
|
||||
clean: ## Remove build output and generated assets
|
||||
@rm -rf public resources
|
||||
@rm -f .hugo_build.lock
|
||||
|
||||
theme-update: ## Move the PaperMod submodule to its latest master commit
|
||||
@git submodule update --remote themes/PaperMod
|
||||
@git diff --submodule=log themes/PaperMod
|
||||
@echo "Review the theme changelog, run 'make check', then commit the gitlink."
|
||||
Reference in new issue
Block a user