fix(web): align RFP sitemap with live source

This commit is contained in:
jinhojang6
2026-08-20 23:10:38 +09:00
committed by Jinho Jang
parent 50be39f982
commit 130a8e029b
2 changed files with 3 additions and 11 deletions
+2 -2
View File
@@ -3,7 +3,6 @@ import type { MetadataRoute } from 'next'
import {
flattenFieldGuideItems,
getAllIdeas,
getAllRfps,
getCircles,
getFieldGuideManifest,
} from '@repo/content/loaders'
@@ -11,6 +10,7 @@ import {
import siteConfig from '@/constants/site-config'
import { ROUTES } from '@/constants/routes'
import { ROUTE_AVAILABILITY } from '@/constants/route-availability'
import { fetchGithubRfps } from '@/lib/rfps-github'
export const dynamic = 'force-static'
@@ -68,7 +68,7 @@ const buildSitemapEntry = (
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const lastModified = new Date().toISOString().split('T')[0]!
const [rfps, ideas, circles, fieldGuide] = await Promise.all([
getAllRfps({ locale: 'en', status: 'published' }),
fetchGithubRfps(),
getAllIdeas({ locale: 'en', status: 'published' }),
getCircles({ locale: 'en', status: 'published' }),
getFieldGuideManifest('en'),
+1 -9
View File
@@ -167,15 +167,7 @@ const main = async (): Promise<void> => {
const failures: string[] = []
const checkedHtmlFiles = new Set<string>()
const expectedRoutes = await collectExpectedRoutes()
// RFP detail pages are sourced from the live GitHub listing, while the sitemap
// is generated from the curated content package, so the two sets legitimately
// differ. Validate the sitemap against everything except RFP detail routes to
// avoid coupling the smoke test to that sourcing difference.
const rfpDetailPrefix = `${ROUTES.rfps}/`
const sitemapRoutes = expectedRoutes.filter(
(route) => !route.startsWith(rfpDetailPrefix)
)
failures.push(...assertSeoFiles(sitemapRoutes))
failures.push(...assertSeoFiles(expectedRoutes))
for (const route of expectedRoutes) {
const htmlFile = findHtmlFile(route)