How I Built My Blog with Astro: My Step-by-Step Process

How I Built My Blog with Astro: My Step-by-Step Process

Here’s the full story of how I rebuilt my blog with Astro — including all the tools, NPM packages, and lessons learned along the way.

I recently rebuilt my personal blog using Astro, and I want to share the whole process — from the first npx create astro@latest to the NPM packages and components that make it work.

If you’re looking to do something similar, I hope this guide gives you a clear roadmap. ⚡


Getting Started

When I decided to redo my blog, my goals were clear:

That’s why I picked Astro — it’s perfect for this kind of project.


Initial Setup

Here’s what I ran to get going:

# Create a new Astro project
npx create astro@latest my-blog
cd my-blog

# Add Tailwind CSS for quick styling
npx astro add tailwind

Why Tailwind? No custom CSS boilerplate, just utility classes and I can focus on layout without writing repetitive CSS.

NPM Packages I Installed

astro Core framework.
@astrojs/tailwind Easy utility-first styles.
@astrojs/mdx Support for writing posts and components in MDX.
@astrojs/rss RSS feed generation for my blog.
date-fns Formatting dates in posts.
recharts Interactive graphs.
astrojs/image Optimized image handling`

npm install @astrojs/mdx @astrojs/rss date-fns recharts

✍️ Writing Content

Astro makes content super easy. I just drop .md or .mdx files into src/content/posts. Each file looks like this:

---
title: "My First Blog Post"
date: "2025-06-02"
excerpt: "A quick look at my process."
coverImage: "/images/my-post.jpg"
---

Your markdown content goes here.

Styling

With Tailwind set up, customizing the UI was painless. Here’s my typical style process:

What I Learned

That’s my process. - Thanks for reading!