常用命令

命令说明
hugo new site <name>创建新站点
hugo new content posts/xx.md新建文章
hugo server -D本地预览(含草稿)
hugo生成静态文件到 public/

目录结构

.
├── archetypes/    # 文章模板
├── content/       # 内容(Markdown)
├── layouts/       # 布局模板
├── static/        # 静态资源
├── themes/        # 主题
└── hugo.toml      # 站点配置

Front Matter 示例

+++
title = "文章标题"
date = 2026-10-19T21:40:00+08:00
draft = false
tags = ["标签"]
+++

更多内容请参考 Hugo 官方文档。