Skip to content

Commit

Permalink
docs: 博客README修改
Browse files Browse the repository at this point in the history
  • Loading branch information
xuxing409 committed Jul 19, 2024
1 parent 48c5939 commit c2ef898
Showing 1 changed file with 2 additions and 66 deletions.
68 changes: 2 additions & 66 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,3 @@
<h1 align="center"> VitePress @sugarat/theme </h1>
<h1 align="center"> 我的博客 </h1>

<p align="center">
简约风的 <a href="https://theme.sugarat.top" target="_blank"target="_blank">VitePress 博客主题</a> 示例运行项目。
</p>

<p align="center">
<a href="https://atqq.github.io/vitepress-blog-sugar-template/" target="_blank">GitHub Pages Demo</a>
</p>

## Usage

先安装 `pnpm`

```sh
npm i -g pnpm
```

安装依赖

```sh
pnpm install
```

开发启动

```sh
pnpm dev
```

构建

```sh
pnpm build
```

预览产物

```sh
pnpm serve
```

## Github Pages 部署

① Github Pages 开启 Git Actions 部署支持

![](https://img.cdn.sugarat.top/mdImg/sugar/8a2454c628d0e2abcc7a0451ddd7d2dc)

② 复制文件 `.github/workflows/deploy.yml` 到自己的项目相同目录下

示例项目已包含,可以直接进行下一步

③ 修改 `docs/.vitepress/config.mts` 里的构建配置

`base` 改为 `"/仓库名/"` 即可

```ts
// 省略无关代码
const base = '/vitepress-blog-sugar-template/'
export default defineConfig({
base,
})
```

④ 推送 `main` 分支即可

需要进一步修改部署和构建配置,详见`deploy.yml` 文件。
# 是柠新呀的博客

0 comments on commit c2ef898

Please sign in to comment.