Skip to content

Site architecture

Astro 7 static site, custom domain namanvashistha.com, hosted on GitHub Pages.

ThingWhere
Themepackage/src/ — local integration, exposes the spectre:globals virtual module (name, themeColor, OG defaults, giscus config)
Layoutsrc/layouts/Layout.astro — one layout, left/right slots via LayoutGrid
SearchPagefind, indexed in postbuild, UI is hand-rolled in Navbar.astro (⌘K)
Commentsgiscus, config injected from workflow env
AnalyticsUmami, plus hits.sh view badges on blog posts
DocsStarlight, at /docs — the one part with its own layout

src/content.config.ts. Markdown ones use glob(); the JSON ones use a hand-written jsonListLoader that reads a single key out of a file.

  • posts, projects, microblog, about, docs — files
  • tags, socials, workExperience, quickInfo — JSON, one key each
  • tags is referenced by the others via reference('tags')

A hand-rolled content collection reusing Layout.astro would have been ~4 files and looked like the rest of the site. Starlight cost an Astro 6 → 7 upgrade, and /docs looks different because it brings its own theme. Bought: a real docs sidebar generated from folders, with no layout code to maintain.

Two things it broke on the way in — Expressive Code can’t also be its own integration (config moved inside starlight({…})), and disable404Route is required or Starlight’s 404 replaces ours.

  • public/_headers sets X-Robots-Tag: noindex on /*. That’s Cloudflare/Netlify syntax — GitHub Pages ignores it entirely, so it does nothing. Leftover.
  • work.json is {"work": []}, so the build warns that workExperience is empty on every run. Expected.
  • src/content/other/ doesn’t exist but is still declared as a collection — second warning on every build.