docs: update README
This commit is contained in:
parent
e5acc80042
commit
0676b01b6a
|
@ -23,9 +23,8 @@ A static blog template built with [Astro](https://astro.build).
|
||||||
2. To edit your blog locally, clone your repository, run `pnpm install` AND `pnpm add sharp` to install dependencies.
|
2. To edit your blog locally, clone your repository, run `pnpm install` AND `pnpm add sharp` to install dependencies.
|
||||||
- Install [pnpm](https://pnpm.io) `npm install -g pnpm` if you haven't.
|
- Install [pnpm](https://pnpm.io) `npm install -g pnpm` if you haven't.
|
||||||
3. Edit the config file `src/config.ts` to customize your blog.
|
3. Edit the config file `src/config.ts` to customize your blog.
|
||||||
4. Change the `site` field in `astro.config.mjs` to your blog's domain.
|
4. Run `pnpm new-post <filename>` to create a new post and edit it in `src/content/posts/`.
|
||||||
5. Run `pnpm new-post <filename>` to create a new post and edit it in `src/content/posts/`.
|
5. Deploy your blog to Vercel, Netlify, GitHub Pages, etc. following [the guides](https://docs.astro.build/en/guides/deploy/). You need to edit the site configuration in `astro.config.mjs` before deployment.
|
||||||
6. Deploy your blog to Vercel, Netlify, GitHub Pages, etc. following [the guides](https://docs.astro.build/en/guides/deploy/).
|
|
||||||
|
|
||||||
## ⚙️ Frontmatter of Posts
|
## ⚙️ Frontmatter of Posts
|
||||||
|
|
||||||
|
|
|
@ -23,9 +23,8 @@
|
||||||
2. 进行本地开发,Clone 新的仓库,执行 `pnpm install` 和 `pnpm add sharp` 以安装依赖
|
2. 进行本地开发,Clone 新的仓库,执行 `pnpm install` 和 `pnpm add sharp` 以安装依赖
|
||||||
- 若未安装 [pnpm](https://pnpm.io),执行 `npm install -g pnpm`
|
- 若未安装 [pnpm](https://pnpm.io),执行 `npm install -g pnpm`
|
||||||
3. 通过配置文件 `src/config.ts` 自定义博客
|
3. 通过配置文件 `src/config.ts` 自定义博客
|
||||||
4. 将 `astro.config.mjs` 中的 `site` 字段修改为博客的域名
|
4. 执行 `pnpm new-post <filename>` 创建新文章,并在 `src/content/posts/` 目录中编辑
|
||||||
5. 执行 `pnpm new-post <filename>` 创建新文章,并在 `src/content/posts/` 目录中编辑
|
5. 参考[官方指南](https://docs.astro.build/zh-cn/guides/deploy/)将博客部署至 Vercel, Netlify, GitHub Pages 等;部署前需编辑 `astro.config.mjs` 中的站点设置。
|
||||||
6. 参考[官方指南](https://docs.astro.build/zh-cn/guides/deploy/)将博客部署至 Vercel, Netlify, GitHub Pages 等
|
|
||||||
|
|
||||||
## ⚙️ 文章 Frontmatter
|
## ⚙️ 文章 Frontmatter
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue