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: [