188 字
1 分钟
astro博客快速开始
准备
npm install -g astro创建项目
- 使用astro cli创建项目
astro create blog-astro- fork主题创建自己的博客,(推荐使用)
如 访问mizuki主题仓库,点击
fork按钮,fork到自己的仓库中,然后克隆到本地。
git clone https://github.com/matsuzaka-yuki/mizuki.gitNOTE推荐fork主题安装因为可以方便的更新主题,如果使用astro cli创建的项目,需要手动更新主题。
运行项目
- 安装依赖
pnpm install- 运行
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...- 打开浏览器访问
http://localhost:4321
常用语法
Admonitions
Following types of admonitions are supported: note tip important warning caution
NOTEHighlights information that users should take into account, even when skimming.
TIPOptional information to help a user be more successful.
IMPORTANTCrucial information necessary for users to succeed.
WARNINGCritical content demanding immediate user attention due to potential risks.
CAUTIONNegative potential consequences of an action.
## Admonitions
Following types of admonitions are supported: `note` `tip` `important` `warning` `caution`
:::noteHighlights information that users should take into account, even when skimming.:::
:::tipOptional information to help a user be more successful.:::
:::importantCrucial information necessary for users to succeed.:::
:::warningCritical content demanding immediate user attention due to potential risks.:::
:::cautionNegative potential consequences of an action.:::部分信息可能已经过时









