快速开始#

本文档将帮助你快速上手 Hugo。

安装 Hugo#

macOS#

brew install hugo

Linux#

sudo apt-get install hugo

Windows#

choco install hugo-extended

创建新网站#

hugo new site my-site
cd my-site

添加主题#

git init
git submodule add https://github.com/alex-shpak/hugo-book themes/hugo-book

创建内容#

hugo new posts/my-first-post.md

构建网站#

hugo

生成的静态文件会在 public 目录中。

本地预览#

hugo server -D

访问 http://localhost:1313 查看效果。