Hugo使用指北

Posted by Solejay on Tue, Feb 14, 2023
  1. 新建文章
1hugo new posts/my-post.md
  1. 编辑摘要
1title: "title"
2date: 2021-04-04T15:08:47+08:00
3draft: true
4toc: true
5image: "image.url"
6tags: ["tag1","tag2"]
7categories: [category]
  1. 编辑内容

  2. 本地开启草稿视图

1hugo server -D
  1. 发布草稿文章

如果需要将草稿内容进行发布,在执行 hugo 生成发布内容时附带 -D 或则 –buildDrafts 即可。

1hugo -D

参考链接

使用 Hugo 发布文章