Merge branch 'fix/sitemap-noindex' — 사이트맵·목록에서 noindex 페이지 제외

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CEQ9auj65yJKk2MnWbtRqU
This commit is contained in:
minaChoiandClaude Opus 5 committed 2026-09-11 14:09:16 +09:00
commit 548ec5c0c1
3 files changed
+39 -4

No files matched your search

+6 -3
View File
@@ -23,6 +23,7 @@ import {
collectJsonLd,
homeMeta,
readBakedLastmod,
readBakedNoindex,
readBakedTitle,
renderHead,
renderLlmsTxt,
@@ -766,9 +767,11 @@ function writeRootMachineFiles(outRoot: string, origin: string) {
.map((entry) => ({slug: entry.name, file: join(sitesDir, entry.name, 'index.html')}))
// index.html 이 없으면 발행이 끝나지 않은(또는 실패한) 디렉토리다. 사이트맵에 넣지 않는다.
.filter((entry) => existsSync(entry.file))
.map((entry) => {
// 제목과 lastmod 가 같은 HTML 에서 나온다 — 파일은 한 번만 읽는다.
const html = readFileSync(entry.file, 'utf-8');
// 제목·lastmod·noindex 가 같은 HTML 에서 나온다 — 파일은 한 번만 읽는다.
.map((entry) => ({...entry, html: readFileSync(entry.file, 'utf-8')}))
// ★ noindex 를 선언한 페이지(목업·백업)는 싣지 않는다 — readBakedNoindex 주석 참조.
.filter((entry) => !readBakedNoindex(entry.html))
.map(({html, ...entry}) => {
return {
// ★ 끝 슬래시를 붙이지 않는다. 페이지의 canonical 은 `/s/<slug>` 다(shared/lib/slug.ts
// publishUrl). 사이트맵이 `/s/<slug>/` 로 어긋나 있던 동안 서치콘솔은 제출한 URL 을