Modern Astro rebuild of my personal site with a hero-first homepage, dual-mode theming, and typed content collections.
npm install
npm run dev- Dev server:
http://localhost:4321/ - Static build:
npm run build - Preview the production build locally:
npm run preview
src/pages/– Astro page routes (homepage, legacy redirects, 404)src/layouts/BaseLayout.astro– Global chrome, theme toggle, and metadatasrc/components/– UI pieces (Hero,SectionHeading,ThemeToggle)src/content/– Zod-typed collections for long-form copy and publicationspublic/– Static assets shipped verbatim (resume.pdf,.nojekyll, favicon).github/workflows/deploy.yml– GitHub Pages workflow usingwithastro/action
- About / Experience: edit the MDX files in
src/content/pages/ - Publications: add MDX files to
src/content/publications/(frontmatter is validated) - Hero copy: tweak props in
src/pages/index.astro - Resume: replace
public/resume.pdf
Push to main and GitHub Actions will:
- Install dependencies and run the Astro build (
withastro/action@v5) - Publish the static
dist/output to GitHub Pages viaactions/deploy-pages@v4
GitHub Pages serves the dist/ bundle. The repo includes:
public/.nojekyllto keep the_astro/assets untouchedastro.config.mjswithsiteconfigured forhttps://nmotlagh.github.io- Redirect stubs (
/about,/experience,/publications) so legacy links continue to work
- Astro 5 with MDX and sitemap integrations
- Prefetch enabled for snappy navigation
- Dual-mode theme tokens using OSU Scarlet (
#BA0C2F) as the primary accent