src/pages/ AGENTS.md

Generated: 2026-03-30 Commit: c93779d Branch: main

OVERVIEW

Astro file-based routing. 9 files with [lang]/ mirrors for i18n. Handles static and dynamic routes.

STRUCTURE

src/pages/
├── index.astro            # Homepage (post list, featured series)
├── post/[...slug].astro   # Dynamic post pages
├── archive.astro          # Archive page
├── categories.astro       # Category listing
├── tags.astro             # Tag listing
├── series/[seriesSlug].astro  # Featured series pages
├── [lang]/                # i18n mirrors (8 files)
└── rss.xml.ts             # RSS feed generation

WHERE TO LOOK

TaskLocationNotes
Homepageindex.astroPost list, featured series, pagination
Post pagespost/[...slug].astroDynamic routes, markdown rendering
Taxonomy pagesarchive.astro, categories.astro, tags.astroFiltered post lists
Series pagesseries/[seriesSlug].astroFeatured series content
i18n routes[lang]/Locale-specific versions
RSSrss.xml.tsAtom feed with full content

CONVENTIONS

  1. Static generation: All pages use getStaticPaths()
  2. Locale handling: Default locale no URL prefix, others use /<locale>/
  3. Thin wrappers: i18n pages delegate to default locale components
  4. SEO: Proper meta tags, canonical URLs, hreflang
  5. Prefetching: All links prefetched (prefetch:)
  6. Error handling: Custom 404 page, graceful fallbacks

ANTI-PATTERNS (THIS MODULE)

  1. Client-side routing: Use Astro’s static generation
  2. Missing i18n: All public pages must have locale variants
  3. Large data passing: Don’t pass body as prop (serialize instead)
  4. Missing meta tags: Every page needs SEO metadata
  5. Over-fetching: Only fetch what’s needed for static generation
  6. Hardcoded URLs: Use Astro.site for canonical URLs

NOTES