This commit is contained in:
YUN-PC5\user 2023-09-14 10:40:02 +08:00
parent 4d7792263b
commit a943aa0aa1

View File

@ -2,5 +2,54 @@
使用`Hexo`框架+`Butterfly`主题构建
##
## 安装
```shell
# 如果未安装yarn包管理工具请先全局安装yarn包管理器
npm install -g yarn
# 进入到项目根目录
cd ./XiaodaBlogSource
# 执行安装依赖命令
yarn
```
## Hexo使用
### 启动本地开发服务器
```shell
hexo server
# or
hexo s
```
### 清空本地缓存
```shell
hexo clean
```
### 构建并发布到 Git 上
```shell
hexo g -d
```
### 只构建
```shell
hexo g
```
将安装的主题推送到Git上
因为主题也是一个git项目需要先把`.git`剪切到任意位置
`.git`文件夹在`themes/butterfly`目录下,是一个隐藏文件夹
```shell
git rm --cache themes/butterfly
git status
git add themes/butterfly
```