Hugo使用筆記
Hugo使用筆記
紀錄Hugo使用的筆記
Hugo 基本指令
安裝
透過Chocolatey 安裝
hchoco install hugo -confirmCheck version:
hugo version建立新Blog
hugo new site blog新增文章
hugo new post/文章名稱.md生成的檔案預設為會帶上 draft: true標記,不會發布。
run server
不 run draft: true 的標記(未發布)
hugo serverrun 全部
hugo server -D插入圖片
建立及設定部落格專案
我們先使用 hugo 命令新增一個空白專案,然後下載一個Template到我們的專案裡面
接著新增四個我們想加到模板 Menu 的頁面: about, history, tags, categories
最後則是新增一篇空白的文章到專案內。
1.create the project
$ hugo new site myblog2.add a theme
$ git submodule add https://github.com/laozhu/hugo-nuo themes/hugo-nuo3.add new pages
$ hugo new about.md
$ hugo new hisroty.md
$ hugo new tags.md
$ hugo new categories.md4.add new article
$ hugo new post/welcome.md- run hugo server -D