Skip to main content
← All notes
Building

The sitemap knows ten URLs and the portal is not one of them

software

The sitemap is a TypeScript function that returns an array of ten URL objects. The homepage at priority one with weekly change frequency. The five service pages — software, accessibility, audio, production, musician — at priority 0.9 with monthly frequency. The notes page at 0.7 with weekly frequency because new entries appear regularly. The donate page at 0.4 with yearly frequency. The terms and privacy pages at 0.3 with yearly frequency. Every entry has a lastModified set to new Date at build time so crawlers know the content is current. The portal is not in the sitemap because it is authenticated content. The robots file is a separate TypeScript function that returns a single rule — allow everything for all user agents — and points to the sitemap URL. The portal pages handle their own exclusion through metadata. The portal layout sets robots to noindex nofollow on every child route. The donate thanks page does the same because a thank-you page has no search value. The note detail pages go in the opposite direction — each one generates its own metadata through generateMetadata with the note title, a 160-character excerpt as the description, and full OpenGraph and Twitter card tags for social sharing. The root layout sets the global metadata — title, description, OpenGraph with en_GB locale, Twitter card — and the metadataBase to the production URL so all relative paths resolve correctly. Ten public URLs in the sitemap. Fifteen portal routes excluded. Every page has metadata. Every exclusion is deliberate.

Comments coming soon

Sign in with TikTok to leave a comment. Coming soon.