Hexo主题的基本配置

创建文章

在Blog路径下输入:(生成在Blog/source/_posts下)

1
hexo new "文章名称"

基本设置

1
2
3
4
5
6
7
8
9
---
title: Hexo-Next主题魔改
date: 2022-07-09 00:00:00
comments: true #是否可评论
toc: true #是否显示文章目录
categories: "捣鼓" #分类
tags: #标签
- next
---

创建标签

在Blog路径下输入:

1
hexo new page tags

基本设置

1
2
3
title: tags
date: 2022-07-09 00:00:00
type: "tags"

创建分类

在Blog路径下输入:

1
hexo new page categories

基本设置

1
2
3
title: categories
date: 2022-07-09 00:00:00
type: "categories"

添加搜索

  • 安装插件
    1
    npm install hexo-generator-searchdb --save

修改站点配置文件:

1
2
3
4
5
search:
path: search.xml
field: post
format: html
limit: 10000

修改主题配置文件:

1
2
3
4
5
search:
path: search.xml
field: post
format: html
limit: 10000

Hexo和主题信息

1
2
# icon between year and author @Footer
authoricon: id-card

隐藏 Hexo 强力驱动

  • 打开主题配置文件,搜索关键字 copyright
    1
    2
    # Footer `powered-by` and `theme-info` copyright
    copyright: false

打赏

1
2
3
reward_comment: 感谢打赏!
wechatpay: /image/vx.png
alipay: /image/zfb.png

Sinx科技

如有其他问题 欢迎扫码咨询 Sinx科技


peace

Author: Sinx科技

Permalink: https://sinx.tech/hexo/

Sinx科技