How to build the site, how it is deployed, and how to resolve common issues.
npm run dev # local dev server at http://localhost:4321
npm run build # type-check, static build, and Pagefind index
npm run preview # serve the built site locallyAlways run npm run build before opening a pull request.
npm run build runs three steps (see package.json):
astro check— type checks and validates all content frontmatter against the Zod schemas insrc/content/config.ts. Invalid content fails here with a file path and message.astro build— renders all pages to static HTML indist/.pagefind --site dist— generates the site-wide search index intodist/pagefind/.
Because search indexing happens at build time, global search only works after a
build — use npm run build && npm run preview to test it locally.
The site is published to GitHub Pages as a static site.
- Build output directory:
dist/ - Search index:
dist/pagefind/ - Default (production) branch:
master
Typical flow:
- Merge changes into
master. - The static site is built and published to GitHub Pages.
See MIGRATION.md for the branch/deployment strategy and history.
Symptom: the browser console shows
Failed to fetch dynamically imported module: ...PublicationSearch.tsx (or a
similar component), and the interactive widget does not load in dev.
Cause: stale HMR / module cache after rapid component edits.
Fix:
- Stop the dev server.
- Restart it with
npm run dev.
- Confirm the file is in the correct collection folder (the People page is folder-driven — the folder decides the section).
- Validate frontmatter fields against
src/content/config.ts. - Run
npm run buildand read any schema errors.
- Confirm entries in
src/data/publications.bibincludecategory,author,year, andresearch. - Confirm the members and research collections are populated — author and tag lists are derived from those.
- Watch for inconsistent
categorycapitalization (e.g.Conferencevsconference), which splits a single type into two filter options.
Global search depends on the Pagefind index, which only exists after a build. Run
npm run build && npm run preview and test there rather than in npm run dev.