預先安裝 Git 和 Node.js
Install Hexo
Dump version
1 2 3
| hexo version // 新版修改 npx hexo version
|
inition Blog
Install all package for Blog
GitHub generate a respsitory
設定 GitHub respsitory 可執行(Setting –> GitHub Pages –> Source –> master –> Save)
編輯部落格下檔案 _config.yml(for GitHub)
1 2 3 4
| deploy: type: git repository: https://github.com/hot5656/blog.git branch: master
|
編輯部落格下檔案 _config.yml(for 圖片放於對應的目錄下)
編輯部落格下檔案 _config.yml(網址設定)
1 2
| url: https://hot5656.github.io/blog/ root: /blog/
|
install hexo-deployer-git(for _config.yml’s type: git)
1
| npm install hexo-deployer-git --save
|
建立新文章
md 檔案顯示圖片(含設定寬度)
1 2 3
| <div style="width:500px"> {% asset_img pic1.png pic1 %} </div>
|
部署上 GitHub
1 2 3
| hexo d -g // 新版修改 npx hexo d -g
|
本地執行