This is a personal tech blog built with Astro, mainly sharing technical learning and ACGN-related tech articles, tutorials, and experience.
-
Clone this repository
git clone <your-repo-url> cd AstroBlog
-
Install dependencies
pnpm install pnpm add sharp
-
Start the development server
pnpm dev
-
Create a new post
pnpm new-post <post-filename>
Then edit the newly created post in the
posts
directory.
Posts use Markdown format. You need to add frontmatter information at the beginning of the file:
---
title: Post Title
published: 2025-04-10
description: Post description, which will be displayed on the article card on the homepage
image: ./assets/cover.jpg
tags: [Tag1, Tag2]
category: Category Name
draft: false
---
Build the static website:
pnpm build
Preview the build result:
pnpm preview
Command | Description |
---|---|
pnpm dev |
Start the development server at localhost:4321 |
pnpm build |
Build the production site to the ./dist/ directory |
pnpm preview |
Preview the build result locally before deployment |
pnpm new-post <filename> |
Create a new post |