This is a my personal blog website built with Astro, TypeScript, and MDX. It serves as a blog to share technical articles and tutorials.
/blog
├── src/
│ ├── content/blog/ # Blog posts (MDX files)
│ ├── components/ # Reusable React/Astro components
│ ├── layouts/ # Page layouts
│ ├── pages/ # Page routes
│ ├── styles/ # Global styles
│ └── assets/ # Static assets (images, fonts)
├── public/ # Public assets (favicons, etc.)
├── astro.config.mjs # Astro configuration
├── package.json # Project dependencies and scripts
└── tsconfig.json # TypeScript configuration
- Node.js (v18 or later)
- npm (v8 or later)
- Clone the repository
- Install dependencies:
npm install
To start the development server:
npm run devThis will start the Astro development server at http://localhost:4321
To build the static site:
npm run buildThe generated static files will be in the dist directory.
To preview the built site locally:
npm run previewBlog posts are written in MDX format and placed in src/content/blog/. Each post should include frontmatter with:
title: Post titledescription: Short descriptionpubDate: Publication dateheroImage: Path to featured imagetags: Array of tags
Example frontmatter:
---
title: "My Blog Post"
description: "A brief description of the post"
pubDate: "2025-01-01"
heroImage: "../../assets/my-image.png"
tags:
- JavaScript
- Web Development
---The site is configured to deploy to GitHub Pages at /blog base path. See .github/workflows/main.yml for deployment configuration.
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a pull request
This project is licensed under the MIT License - see the LICENSE file for details.