Personal website and blog built with Astro.
- Astro 5 with TypeScript (strict config)
- Astro content collections for blog posts
- MD and MDX content support
- Math rendering with
remark-math+rehype-katex - RSS feed generation with
@astrojs/rss - Sitemap generation with
@astrojs/sitemap
- Node.js 20+
- pnpm 10+
pnpm install
pnpm run devAstro will start a local dev server (typically at http://localhost:4321).
pnpm run dev- start the local development serverpnpm run build- create a production build indist/pnpm run preview- preview the production build locallypnpm run format- format the codebase with Prettierpnpm astro- run Astro CLI commands directly
.
|- src/
| |- components/ # shared UI components
| |- layouts/ # page layouts (for blog posts)
| |- pages/ # route-based pages
| |- styles/ # global styles and theme tokens
| |- content.config.ts
|- public/ # static assets
|- astro.config.mjs # Astro + markdown integration config
Blog posts are loaded from src/content/blog/**/*.{md,mdx}.
Create a new file in src/content/blog/, for example:
src/content/blog/my-first-post.mdxsrc/content/blog/research/notes.md
Each post must include this frontmatter shape:
---
title: "Post title"
description: "Short description"
pubDate: 2026-03-04
updatedDate: 2026-03-05 # optional
---- Inline math:
$E = mc^2$ - Block math:
$$
\int_0^1 x^2 dx = \frac{1}{3}
$$- Update site title/description in
src/consts.ts - Update canonical site URL in
astro.config.mjs(site)
pnpm build
pnpm previewThe production output is generated in dist/, including:
sitemap-index.xmlrss.xml