The production sitemap has no lastmod because the image build has no git #225

Closed
opened 2026-09-10 04:13:34 -05:00 by null · 1 comment
Owner

Seen at a25077d (v0.9.5): curl -s https://queuenorth.com/sitemap.xml | grep -c '<lastmod>' prints 0. A local build prints 18.

Cause. .dockerignore:21 excludes .git, node:20-alpine has no git binary, the image runs npm run build (Dockerfile:23), and lastModifiedFor's empty catch (scripts/prerender.js:142-144) hides the failure. Every document that says lastmod comes from git history describes the local build only.

What it costs. Search engines schedule recrawls partly on lastmod; Bing leans on it, and Bing's index also feeds Copilot and ChatGPT search. Every page looks undated, including the two long-form pages this batch exists for.

What to do. release.sh, which has git, computes a route-to-date map and passes it as a SITEMAP_LASTMOD build arg to the Dockerfile builder stage. prerender reads it first and reports how many routes have no date. release.sh checks the built image's sitemap has lastmod values. Service routes also count their src/data/serviceContent/<slug>.js. docs/OPERATIONS.md documents the arg.

Verify: after the release, curl -s https://queuenorth.com/sitemap.xml | grep -c '<lastmod>' prints 18.

Seen at a25077d (v0.9.5): `curl -s https://queuenorth.com/sitemap.xml | grep -c '<lastmod>'` prints 0. A local build prints 18. **Cause.** `.dockerignore:21` excludes `.git`, `node:20-alpine` has no git binary, the image runs `npm run build` (`Dockerfile:23`), and `lastModifiedFor`'s empty `catch` (`scripts/prerender.js:142-144`) hides the failure. Every document that says `lastmod` comes from git history describes the local build only. **What it costs.** Search engines schedule recrawls partly on `lastmod`; Bing leans on it, and Bing's index also feeds Copilot and ChatGPT search. Every page looks undated, including the two long-form pages this batch exists for. **What to do.** release.sh, which has git, computes a route-to-date map and passes it as a `SITEMAP_LASTMOD` build arg to the Dockerfile builder stage. prerender reads it first and reports how many routes have no date. release.sh checks the built image's sitemap has `lastmod` values. Service routes also count their `src/data/serviceContent/<slug>.js`. `docs/OPERATIONS.md` documents the arg. Verify: after the release, `curl -s https://queuenorth.com/sitemap.xml | grep -c '<lastmod>'` prints 18.
null added this to the Batch 18: Guards and landmines found building Batch 17 milestone 2026-09-10 04:13:34 -05:00
null added the
P2
bug
infra
seo
labels 2026-09-10 04:13:34 -05:00
null closed this issue 2026-09-10 04:58:41 -05:00
Author
Owner

Fixed and live as of the v0.9.6 deploy on 2026-09-10. scripts/release.sh computes the route-to-date map from git history, passes it as the SITEMAP_LASTMOD build arg (ARG/ENV in the Dockerfile builder stage), and refuses to publish an image whose sitemap has no dates; scripts/lib/routes.js holds the map and a service page now also counts its own content file, so editing one page's copy moves that page's date alone. Proven end to end: curl -s https://queuenorth.com/sitemap.xml | grep -c '' prints 18 where it printed 0 this morning, and /services/unified-communications shows 2026-09-10. Before the fix, a build with git deliberately unreadable reported '18 URLs, 0 carrying a lastmod' and warned; prerender now prints that count on every run.

Fixed and live as of the v0.9.6 deploy on 2026-09-10. scripts/release.sh computes the route-to-date map from git history, passes it as the SITEMAP_LASTMOD build arg (ARG/ENV in the Dockerfile builder stage), and refuses to publish an image whose sitemap has no dates; scripts/lib/routes.js holds the map and a service page now also counts its own content file, so editing one page's copy moves that page's date alone. Proven end to end: curl -s https://queuenorth.com/sitemap.xml | grep -c '<lastmod>' prints 18 where it printed 0 this morning, and /services/unified-communications shows <lastmod>2026-09-10</lastmod>. Before the fix, a build with git deliberately unreadable reported '18 URLs, 0 carrying a lastmod' and warned; prerender now prints that count on every run.
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: null/Queue-North-Website#225
No description provided.