hexo new 命令的使用

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 默认在 source/_post 目录下新一篇文章
hexo new text

# 按照指定模板建立 文章
# 这个模板 layout 可以根据需求以md 的形式创建于scaffolds文件夹
hexo new [layout_name] text
# 例如
hexo new algo text

# 要指定在某个文件下创建文章
# 如下所示 加上 --path参数 则会在 about/me 文件夹下创建about me.md
hexo new page --path about/me "about me"
# 例如
# 以algo 模板 创建leetcode/leetcode198打家劫舍 文章的标题名为 leetcode198打家劫舍
hexo new algo --path leetcode/leetcode198打家劫舍 "leetcode198打家劫舍"

hexo 创建分类页面

  1. 新建一个页面,命名为 categories :
    1
    hexo new page categories
  2. 编辑刚新建的页面,将页面的类型设置为 categories ,主题将自动为这个页面显示所有分类。
    1
    2
    3
    4
    title: 分类
    date: 2023-12-22 13:49:04
    type: "categories"
    ---

hexo 插入图片

1
2
3
# src   图像源
# style 图片大小
<img src = "/Redis集群化部署/图2-redis-conf配置图.png" style = "zoom:75%" >