Hugo使用筆記
Hugo使用筆記
紀錄Hugo使用的筆記
Hugo 基本指令
安裝
透過Chocolatey 安裝
hchoco install hugo -confirm
Check version:
hugo version
建立新Blog
hugo new site blog
新增文章
hugo new post/文章名稱.md
生成的文件默認為會帶上 draft: true標記,不會發布。
run server
不 run draft: true 的標記(未發布)
hugo server
run 全部
hugo server -D
插入圖片

建立及設定部落格專案
我們先使用 hugo 命令新增一個空白專案,然後下載一個Template到我們的專案裡面
接著新增四個我們想加到模板 Menu 的頁面: about, history, tags, categories
最後則是新增一篇空白的文章到專案內。
1.create the project
$ hugo new site myblog
2.add a theme
$ git submodule add https://github.com/laozhu/hugo-nuo themes/hugo-nuo
3.add new pages
$ hugo new about.md
$ hugo new hisroty.md
$ hugo new tags.md
$ hugo new categories.md
4.add new article
$ hugo new post/welcome.md
- run hugo server -D