1. 安裝hugo
1)下載
Hugo Releases,選擇hugo_xxx_Windows-64bit.zip(xxx位版本)。
2)設置路徑
我的電腦-》屬性-》高級系統設置-》環境變量
在path中加入hugo的解壓后的目錄。
例如:
D:\program\hugo_0.88.1
2. 使用hugo
1)生成站點
使用yaml格式
hugo new site \gitee\my\blog -f yaml
2) 生成文章
cd gitee\my\blog hugo new post/first.md
3) 安裝皮膚
例如:我的(hugo-theme-casper)
git clone https://github.com/vjeantet/hugo-theme-casper.git
把克隆下拉的倉庫,拷貝到“themes”下。
4)設置站點配置
config.toml
baseURL : https://xiaobin80.gitee.io/blog/ languageCode : zh-cn title : 我的技術blog theme : hugo-theme-casper publishdir : ../blog
3. 發布
1)clone gitee
git clone https://gitee.com/xiaobin80/blog.git
把這個倉庫放到,之前我們生成的“gitee”目錄。
2)publish
hugo
注意:在發布的時候,我們的文章中的“draft=true”要去掉!
4.提交並更新
1)提交我們的倉庫代碼,具體操作見《Git客戶端(Windows系統)的使用》
2)在gitee上更新我們的blog
參考文檔: