news: track @newsHidden in Caddy snapshot + extract testable feed routing helpers
Housekeeping per Codex: - Mirror the live @newsHidden rule into deploy/caddy/Caddyfile.snapshot so the /news noindex protection is reproducibly recorded. - Extract the feed's routing helpers (feedBase/parseView/viewUrl) into pure $lib/feednav.js and unit-test them (the base-aware URL generation wasn't exercised by the prior suite). NewsFeed imports them; behavior unchanged. (Note: the step-1 commit also swept in data/wotd_audio/renewal.mp3 — a legit cached pronunciation, not extraction-related; left as-is per Codex.) 32 frontend tests green; build clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -63,6 +63,12 @@ upbeatbytes.com {
|
||||
header @hidden X-Robots-Tag "noindex, nofollow"
|
||||
|
||||
# /news is the feed's future home — rendered during the relaunch transition but kept
|
||||
# noindex (FOLLOW, so link equity still flows) until cutover, when this line is removed
|
||||
# and /news enters the sitemap. Avoids publishing a duplicate indexable feed.
|
||||
@newsHidden path /news /news.html
|
||||
header @newsHidden X-Robots-Tag "noindex, follow"
|
||||
|
||||
# Content-hashed assets never change for a given URL — cache them forever.
|
||||
@immutable path /_app/immutable/*
|
||||
header @immutable Cache-Control "public, max-age=31536000, immutable"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user