07/15/2024, 24:00
Why Astro is perfect for a fast portfolio
Astro ships zero-JS by default, which keeps first paint tiny even on slow networks. With content living in the repo, I can author Markdown or MDX locally, preview instantly via npm run dev, then publish via GitHub Actions without touching the server.
The build output is just HTML / CSS / JS under dist/, so the domestic server only needs Nginx + rsync to serve the files.
Key guardrails I use:
- Keep layout/components in
src/and content insrc/content/. - Use frontmatter for metadata (title, description, tags, publishedAt).
- Avoid runtime databases—everything is versioned alongside the code.
npm install
npm run dev