git clone -b hexo git@github.com:883901/883901.github.io.gi
npm install hexo --save
git add . 添加所有文件到暂存区
git commit -m "" 提交,""里面填更新的标题
git push origin hexo 推送hexo分支到github
注意,以上所有的步骤都已经执行过本地关联远程仓库操作了。
git remote add origin git@github.com:883901/883901.github.io.git
npm install -g hexo-cli
cd /d/hexo
hexo init
npm install
_config.yml 为网站的 配置 信息
git clone https://github.com/theme-next/hexo-theme-next themes/next
修改网站配置文件主题为:next
deploy:
type: git
repository: git@github.com:883901/883901.github.io.git
branch: master
可把备份的文章直接放到 _posts文件夹呢 修改主题配置文件,参考https://theme-next.org/docs/getting-started/
注:npm install --save hexo-deployer-git (上床到github失败时)