Hugo 筆記

紀錄個人安裝與執行Hugo的過程

Hugo 安裝操作過程之紀錄


Hugo

Hugo-installing

環境需求

Hugo 是跨平台的,可以在以下環境安裝:

  • macOS (Darwin) for x64, i386, and ARM architectures
  • Windows <=本人使用這個
  • Linux
  • OpenBSD
  • FreeBSD

Homebrew (macOS or Linux)

brew install hugo

Chocolatey (Windows)

在管理者模式的PowerShell中下指令

1
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

接著下:

choco install hugo -confirm

如果要使用到CSS就裝擴展的 Sass/SCSS 版本:

choco install hugo-extended -confirm

版本資訊

hugo version

列出所有可用指令

hugo help

建立新專案

hugo new site example.com

輸出靜態文件

hugo

構建靜態頁面

hugo -D

本地編譯時,一併連同草稿文件都顯示

hugo server -D

JavaScript 構建

Hugo Pipes


夜路走多了,總匯三明治

Somebody
Built with Hugo
Theme Stack designed by Jimmy