From e216d18561b1fedf09bc23e5e0d1544ed10a3c83 Mon Sep 17 00:00:00 2001 From: Zeeshan Adil Date: Fri, 13 Nov 2026 18:44:58 +0500 Subject: [PATCH] fix(seo): put posts and guides back in the sitemap The previous change made the sitemap refresh hourly. That moved it from build time to request time, where the content folder is not available, so the 13 posts and guides dropped out and the live sitemap went from 35 addresses to 26. The sitemap is built once per deploy again. The DSOC project pages stay in it: the database is read at build time. --- app/sitemap.ts | 6 +++--- next.config.js | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/sitemap.ts b/app/sitemap.ts index 65155c9..4b8592d 100644 --- a/app/sitemap.ts +++ b/app/sitemap.ts @@ -67,9 +67,9 @@ function contentEntries(folder: 'blog' | 'guides', priority: number): MetadataRo }) } -// Rebuilt hourly so a new DSOC project appears without a deploy -export const revalidate = 3600 - +// Built once per deploy, on purpose. Posts and guides are read from the content +// folder, which exists while the site is built but not where pages are rendered +// later, so a sitemap rebuilt on a timer loses them. export default async function sitemap(): Promise { // Static pages carry no lastModified: claiming every page changed "now" on each // build tells search engines nothing. Posts and guides use their real dates. diff --git a/next.config.js b/next.config.js index c503751..7d57c87 100644 --- a/next.config.js +++ b/next.config.js @@ -55,6 +55,8 @@ const nextConfig = { outputFileTracingIncludes: { '/agent-markdown': ['./content/blog/**/*.md', './content/guides/**/*.md'], '/llms-full.txt': ['./content/blog/**/*.md', './content/guides/**/*.md'], + // Belt and braces: the sitemap is built at deploy time, but must never lose its posts + '/sitemap.xml': ['./content/blog/**/*.md', './content/guides/**/*.md'], }, images: { remotePatterns: [