• 简介
    • hugo由go编写,开源,特点为编译快
    • 本文基于hugo0.49
  • 安装
    • go install —tags extended
  • 命令
    • hugo
      • help
      • help server # server代表任何子命令
  • 场景
    • 发布
    • 生成站点
      • hugo new site blog1 # 站点命令在blog1中执行
    • 生成文章
      • hugo new about.md
      • hugo new post/first.md
    • 本地服务器
      • hugo server
        • 自带watch
        • s /path/to/codes
        • -theme=hyde
        • -buildDrafts
        • p 1315
          • 默认端口1313
    • 主题
    • 文章
      • 开头
        • 用YAML写内容
        • — # +++标记可写TOML
        • Description = ""
        • Categories = [“a1”, “a2”]
        • Tags = [“b1”,“b2”]
        • draft = true # 文章隐藏
        • menu = ""
        • title = “a” # 文章标题
    • 配置
      • 打开config.toml # 可以是config.yaml、config.json
      • baseURL = ""
      • title = ""
      • theme = ""
      • [permalinks]
        • post = ”/:year/:month/:title/” # 生成list页面
      • [taxonomies]
        • category = “categories”
        • tag = “tags”
      • [params]
        • description = ""
        • author = ""
      • ignoreFiles = []
      • [blackfriday] # 设置markdown库