hexo博客同步

此博客停止更新遷移至 SnailDove’s Blog,查看本文點擊此處
舊電腦上博客根目錄執行

git init
git check -b source
git check source
git add *
git rm --cached ./node_modules/ ./source/_drafts ._config.yml ./themes/next/_config.yml
vim .gitignore #添加:./node_modules/ ./source/_drafts ._config.yml ./themes/next/_config.yml 
##(博客根目錄配置文件與主題配置文件不同步到github,防止泄露隱私,百度雲盤隱藏空間備份)
git commit -m "初次同步博客"
git push origin source:source

新電腦上博客的新目錄下執行

在github的 .github.io.git(代表你的github用戶名) 倉庫上設置 source 分支爲默認分支

git 配置完成以後

git clone https://github.com/~/~.github.io.git
cd ~.github.io.git
npm install hexo
npm install
npm install hexo-deployer-git

latex公式問題

按網上的教程繼續修改 ./node_modules/marked/marked.js 以支持數學公式中的 \ -

發佈了87 篇原創文章 · 獲贊 32 · 訪問量 25萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章