From a943aa0aa11c063ae1799c55719a38ed79d29971 Mon Sep 17 00:00:00 2001 From: "YUN-PC5\\user" Date: Thu, 14 Sep 2023 10:40:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 26c87c4..ee7f342 100644 --- a/README.md +++ b/README.md @@ -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 +```