创建新文章

hugo new post/folder/index.md
  • folder:自定义的文件夹名
  • index:自定义的markdown文件名

配置分类

  1. 创建分类:在content\categories下以分类名创建新的文件夹
  2. 创建分类配置文件:content\categories\分类名\_index.md
title: "Blog"
description: "博客的建造工艺"
slug: "blog"
image: "blog.jpg"
style:
    background: "#2a9d8f"
    color: "#fff"
  • image:为content\categories\分类名\目录下的图片文件名

编辑文章

slug: xxx
categories: 
    - Blog
tags: 
    - Hugo
  • slug:文章url为exmaple.com/xxx/
  • categories: 分类
  • tags:标签

发布上线

  1. 参照【Hugo之路 番外1】自动构建并上传到github创建git.bat文件
  2. 运行git.bat即可
最后修改:2023 年 08 月 26 日
如果觉得我的文章对你有用,请随意赞赏