fix: 사이트맵에서 지역 오늘 페이지(/today/…)도 제외 — 홈과 /faq·/gak 같은 기본 페이지 11개만 남김, 페이지는 그대로 만들고 noindex 는 넣지 않음

This commit is contained in:
skkim committed 2026-11-13 15:49:36 +09:00
1 parent 99033d13db
commit fc0ac46b57
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -282,8 +282,8 @@ function seoPages(): Plugin {
writeFileSync(file, f.html)
}
const today = new Date().toISOString().slice(0, 10)
// 내일 페이지와 시도별 FAQ 는 페이지는 만들되 사이트맵에는 넣지 않는다 (틀이 같은 주소가 너무 많아서)
const listed = [...faqs, ...PAGES].map((p) => p.path).filter((path) => !path.startsWith('tomorrow/') && !path.startsWith('faq/'))
// 지역 오늘·내일 페이지와 시도별 FAQ 는 페이지는 만들되 사이트맵에는 넣지 않는다 (틀이 같은 주소가 너무 많아서)
const listed = [...faqs, ...PAGES].map((p) => p.path).filter((path) => !/^(today|tomorrow|faq)\//.test(path))
const urls = ['', ...listed].map((path) => ` <url><loc>${site}/${path}</loc><lastmod>${today}</lastmod></url>`)
writeFileSync(resolve(outDir, 'sitemap.xml'), `<?xml version="1.0" encoding="UTF-8"?>\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n${urls.join('\n')}\n</urlset>\n`)
},