mirror of
https://github.com/logos-co/logos-web.git
synced 2026-08-27 12:11:14 +00:00
fix(web): align RFP sitemap with live source
This commit is contained in:
@@ -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'),
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user