记录 Hugo 的基础用法。

安装

snap install hugo

创建站点

hugo new site myblog
cd myblog

本地预览

hugo server -D

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

构建

hugo --minify

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