ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/thatdeveloperguy-website / src/engines/seo/sitemaps/build-sitemap.ts

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/thatdeveloperguy-website / src/engines/seo/sitemaps/build-sitemap.ts
DateNot specified in source
RepositoryJanady13/thatdeveloperguy-website
Revision2bea2ebdff0e34494bff597d4fa9c8422a0c3a94
Branchmain
Path or archive membersrc/engines/seo/sitemaps/build-sitemap.ts
Original SHA-2565b4e7784744cd5c6c078618e918ce5c2013eb190d6a47535c28a197df4543aca
Git blob SHA312f5eef302103688640e42fabd170f8e47c1266
Reading-copy SHA-2565b4e7784744cd5c6c078618e918ce5c2013eb190d6a47535c28a197df4543aca

Original source ↗

Recovered source transcript

import { PRODUCTION_ORIGIN } from '../urls/production-origin.ts'; import type { RouteManifestEntry } from '../../../contracts/page.ts'; const url = (path: string) => path === '/' ? `${PRODUCTION_ORIGIN}/` : `${PRODUCTION_ORIGIN}${path}`; /** Only approved, canonical, indexable pages: no drafts (they never reach the manifest), no noindex pages, no API or receipt paths. */ export function sitemapEntries(routes: RouteManifestEntry[]): string[] { return routes.filter(r => r.publicationStatus === 'published' && r.indexPolicy === 'index').map(r => url(r.path)); } export function sitemapXml(routes: RouteManifestEntry[]): string { const entries = routes .filter(route => route.publicationStatus === 'published' && route.indexPolicy === 'index') .map(route => { const lastmod = route.materiallyUpdatedAt ?? route.publishedAt; return ` <url><loc>${url(route.path)}</loc>${lastmod ? `<lastmod>${lastmod}</lastmod>` : ''}</url>`; }); return `<?xml version="1.0" encoding="UTF-8"?>\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n${entries.join('\n')}\n</urlset>\n`; } /** The node records thatdeveloperguy.com's sitemap as sitemap-index.xml; keep that address valid by indexing the one sitemap. */ export function sitemapIndexXml(): string { return `<?xml version="1.0" encoding="UTF-8"?>\n<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n <sitemap><loc>${PRODUCTION_ORIGIN}/sitemap.xml</loc></sitemap>\n</sitemapindex>\n`; }

Search equations, builds, manuscript text, and recovered sources.