hexo源码入库

接入hexo目录构建本地的git库

  1. git init

添加要纳入版本管理的文件

image.png :::warning 【 注意 】 themes 下面git clone 下来的版本把对应的.git目录干掉 :::

  1. git add _config.yml
  2. git add hexo-theme-next/
  3. git add package-lock.json
  4. git add package.json
  5. git add scaffolds/
  6. git add source/
  7. git add themes/

提交修改到本地库

  1. git commit -m "add hexo source code"

构建远端目标库链接

  1. git remote add origin https://gitee.com/shencp/hexo.git

本地版本库推送到远端

  1. git push -f origin master

:::info 通过-f可以直接将之前提交的代码覆盖,将本次提交的代码库作为初始代码库版本 :::

源码使用

clone代码

  1. git clone https://gitee.com/shencp/hexo.git

重新部署hexo

  1. npm install hexo // 安装hexo 安装完成hexo 不需要初始化hexo,否者hexo 配置参数会重置

参考文档

https://blog.csdn.net/qq_25458977/article/details/87875641
https://www.jianshu.com/p/55f11d8973f0