A modern, fast, and clean developer blog built with Astro, styled with Tailwind CSS, and deployed on GitHub Pages.
- ✅ Fast, lightweight, and SEO-friendly
- ✅ Dark mode support (automatic based on system preferences)
- ✅ MDX support for interactive blog posts
- ✅ Syntax highlighting for code blocks
- ✅ Responsive design (mobile-friendly)
- ✅ RSS feed and sitemap generation
- ✅ Automatic deployment via GitHub Actions
- ✅ Custom MDX components (Callout boxes)
- ✅ Blog post tags and metadata
/
├── public/ # Static assets (fonts, images)
├── src/
│ ├── assets/ # Images that will be optimized by Astro
│ ├── components/ # Reusable Astro components
│ │ ├── Callout.astro # Custom MDX callout component
│ │ ├── Header.astro # Site navigation header
│ │ ├── Footer.astro # Site footer
│ │ └── ...
│ ├── content/ # Content collections
│ │ └── blog/ # Blog posts (*.md, *.mdx)
│ ├── layouts/ # Page layouts
│ │ └── BlogPost.astro # Blog post layout
│ ├── pages/ # File-based routing
│ │ ├── index.astro # Homepage with blog list
│ │ ├── about.astro # About page
│ │ └── blog/
│ │ ├── [...slug].astro # Dynamic blog post pages
│ │ └── index.astro # Blog archive page
│ ├── styles/
│ │ └── global.css # Global styles + Tailwind
│ └── consts.ts # Site configuration
├── .github/
│ └── workflows/
│ └── deploy.yml # GitHub Actions deployment
├── astro.config.mjs # Astro configuration
├── CLAUDE.md # Claude Code guidance
└── package.json
- Node.js 20+
- npm
- Clone the repository:
git clone <your-repo-url>
cd abraham-blog- Install dependencies:
npm install- Start the development server:
npm run devThe site will be available at http://localhost:4321/
| Command | Description |
|---|---|
npm run dev |
Start development server at localhost:4321 |
npm run build |
Build production site to ./dist/ |
npm run preview |
Preview production build locally |
npm run astro ... |
Run Astro CLI commands |
-
Create a new
.mdxor.mdfile insrc/content/blog/ -
Add frontmatter with required metadata:
---
title: "Your Post Title"
description: "A brief description of your post"
pubDate: 2025-01-25
tags: ["tag1", "tag2"]
heroImage: "/blog-placeholder-1.jpg" # Optional
---- Write your content using Markdown or MDX
Import and use custom components in your .mdx posts:
---
title: "Example Post"
description: "Using MDX components"
pubDate: 2025-01-25
tags: ["example"]
---
import Callout from '../../components/Callout.astro';
<Callout type="info">
This is an info callout! Types: info, warning, success, error
</Callout>Code blocks are automatically highlighted. Just use triple backticks with a language:
```javascript function example() { console.log("Hello, world!"); } ```
This blog automatically deploys to GitHub Pages when you push to the master branch.
- Go to your GitHub repository settings
- Navigate to Pages (under "Code and automation")
- Under Source, select GitHub Actions
Update astro.config.mjs with your GitHub Pages URL:
export default defineConfig({
site: 'https://yourusername.github.io',
// If using a project repo (not username.github.io):
// base: '/repo-name',
// ...
});npm run buildThe static site will be built to ./dist/ and can be deployed anywhere.
Edit src/consts.ts to update site title, description, and other metadata:
export const SITE_TITLE = 'Your Blog Title';
export const SITE_DESCRIPTION = 'Your blog description';- Colors & Theme: Edit CSS custom properties in
src/styles/global.css - Dark Mode: Colors are defined in the
@media (prefers-color-scheme: dark)section - Tailwind: Add utility classes or customize
astro.config.mjs
Edit src/components/Header.astro to add/remove navigation links.
Edit src/components/Footer.astro to customize footer content.
This project is open source and available for anyone to use as a template for their own blog.
- Built with Astro
- Styled with Tailwind CSS
- Base template inspired by Bear Blog
- Font: Atkinson Hyperlegible