Build location-independent pages only (no base URL at deploy)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YDRjtmAiNpo5mK5N3d7QwZ
This commit is contained in:
@@ -18,9 +18,9 @@ check: build ## build, then verify every internal link and image
|
|||||||
serve: ## local preview on http://localhost:1313
|
serve: ## local preview on http://localhost:1313
|
||||||
hugo server
|
hugo server
|
||||||
|
|
||||||
deploy: ## build for DEPLOY_URL, check, and copy public/ to DEPLOY_DIR
|
deploy: ## build, check, and copy public/ to DEPLOY_DIR (served at DEPLOY_URL)
|
||||||
rm -rf public
|
rm -rf public
|
||||||
hugo --panicOnWarning --minify --baseURL $(DEPLOY_URL)
|
hugo --panicOnWarning --minify
|
||||||
python3 tools/check_links.py public
|
python3 tools/check_links.py public
|
||||||
@test -d "$(dir $(DEPLOY_DIR))" || { echo "share not mounted: $(dir $(DEPLOY_DIR))"; exit 1; }
|
@test -d "$(dir $(DEPLOY_DIR))" || { echo "share not mounted: $(dir $(DEPLOY_DIR))"; exit 1; }
|
||||||
mkdir -p "$(DEPLOY_DIR)"
|
mkdir -p "$(DEPLOY_DIR)"
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
baseURL = "/"
|
baseURL = "/"
|
||||||
title = "Old-Computers.com"
|
title = "Old-Computers.com"
|
||||||
locale = "en"
|
locale = "en"
|
||||||
disableKinds = ["rss"]
|
# relative URLs only: no absolute address is known at build time, so no feed or sitemap
|
||||||
enableRobotsTXT = true
|
disableKinds = ["rss", "sitemap"]
|
||||||
# pages keep working when the site is served from a sub-directory
|
# pages keep working when the site is served from a sub-directory
|
||||||
relativeURLs = true
|
relativeURLs = true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user