A personal blog website built with AstroJS for publishing blog posts.
Blog posts are written in MDX, with reusable Astro components and layouts for presentation.
Set draft: true in a post's frontmatter to exclude it from production builds, post lists, tags, RSS, and the sitemap. Drafts can still be previewed at their /blog/<slug>/ URL with npm run dev. Omit draft or set it to false to publish the post.
Files in public/ are always copied to dist/, including images referenced by drafts.
Use the Node.js version specified in .node-version. Run the following commands from the repository root.
-
Install dependencies:
npm ci
-
Start the development server:
npm run dev
Open the URL printed in the terminal (usually http://localhost:4321) and check your changes in the browser. The site updates as you edit files. Press
Ctrl+Cto stop the server. -
Build the site for production:
npm run build
The generated site is written to
dist/. Resolve any build errors before proceeding. -
Preview the production build locally:
npm run preview
Open the URL printed in the terminal and verify the affected pages. Run
npm run buildagain after making further changes to update the preview.