A minimal personal blog built with Astro, deployed on Netlify.
- Framework: Astro 4 (static site generator)
- Content: Markdown files in
src/content/posts/ - Styling: Plain CSS with CSS custom properties (no Tailwind or UI libraries)
- Theme: Automatic dark/light mode (respects system preference + manual toggle)
- Feed: RSS at
/rss.xml - Hosting: Netlify
# Install dependencies
npm install
# Start dev server
npm run dev
# → http://localhost:4321
# Build for production
npm run build
# Preview production build locally
npm run previewCreate a new .md file in src/content/posts/:
---
title: "My post title"
pubDate: 2026-03-07
description: "A short description (used in RSS and meta tags)."
---
Your post content here, in Markdown.The filename becomes the URL slug: my-new-post.md → /posts/my-new-post/.
To hide a draft post from the list, add draft: true to the frontmatter.
| What | Where |
|---|---|
| Site title & author name | src/layouts/BaseLayout.astro |
| Site URL (for RSS & canonical) | astro.config.mjs → site |
| About page text | src/pages/about.astro |
| Favicon | public/favicon.svg |
| Colours & fonts | <style> block in src/layouts/BaseLayout.astro |
- Push this repo to GitHub.
- Go to app.netlify.com → Add new site → Import an existing project.
- Connect your GitHub repo. Netlify will auto-detect the
netlify.tomlsettings. - Click Deploy site.
npm install -g netlify-cli
netlify init
netlify deploy --prodUpdate site in astro.config.mjs with your real Netlify URL (or custom domain):
export default defineConfig({
site: 'https://yourdomain.com',
});This ensures RSS feed links and canonical URLs are correct.
In Netlify: Site settings → Domain management → Add custom domain.
Then update site in astro.config.mjs.