mobile wallpaper 1mobile wallpaper 2mobile wallpaper 3mobile wallpaper 4mobile wallpaper 5mobile wallpaper 6
188 字
1 分钟
astro博客快速开始
2026-01-11
统计加载中...

准备#

  1. 安装 Node.jsnpm
  2. 安装 Astro CLI
npm install -g astro

创建项目#

  1. 使用astro cli创建项目
astro create blog-astro
  1. fork主题创建自己的博客,(推荐使用) 如 访问mizuki主题仓库,点击fork按钮,fork到自己的仓库中,然后克隆到本地。
git clone https://github.com/matsuzaka-yuki/mizuki.git
NOTE

推荐fork主题安装因为可以方便的更新主题,如果使用astro cli创建的项目,需要手动更新主题。

运行项目#

  1. 安装依赖
pnpm install
  1. 运行
pnpm run dev

如果控制台出现

astro v5.16.4 ready in 4769 ms
┃ Local http://localhost:4321/
┃ Network use --host to expose
11:08:06 watching for file changes...
  1. 打开浏览器访问 http://localhost:4321

常用语法#

Admonitions#

Following types of admonitions are supported: note tip important warning caution

NOTE

Highlights information that users should take into account, even when skimming.

TIP

Optional information to help a user be more successful.

IMPORTANT

Crucial information necessary for users to succeed.

WARNING

Critical content demanding immediate user attention due to potential risks.

CAUTION

Negative potential consequences of an action.

## Admonitions
Following types of admonitions are supported: `note` `tip` `important` `warning` `caution`
:::note
Highlights information that users should take into account, even when skimming.
:::
:::tip
Optional information to help a user be more successful.
:::
:::important
Crucial information necessary for users to succeed.
:::
:::warning
Critical content demanding immediate user attention due to potential risks.
:::
:::caution
Negative potential consequences of an action.
:::
分享

如果这篇文章对你有帮助,欢迎分享给更多人!

astro博客快速开始
https://astro.342901.xyz/posts/astro/quick-start/
作者
geekswg
发布于
2026-01-11
许可协议
CC BY-NC-SA 4.0

部分信息可能已经过时

封面
Sample Song
Sample Artist
封面
Sample Song
Sample Artist
0:00 / 0:00