tag页面功能添加

步骤一生成 Tag page

你需要在hexo根目录的source文件夹下新建一个tags文件夹,然后在tags文件夹里面新建一个index.md文件。快捷命令为:$ hexo new page “tags”

步骤二编辑index.md文件,内容如下:

1
2
3
4
5
---
title: "tags"
type: tags
layout: "tags"
---

步骤三 打开Next主题 tags 选项

新建标签及分类界面
打开 主题配置文件,搜索 menu,找到如下代码:
把 tags 和 categories 前面的 # 删除,

1
2
3
4
5
6
7
8
9
menu:
home: / || home
#about: /about/ || user
#tags: /tags/ || tags
#categories: /categories/ || th
archives: /archives/ || archive
#schedule: /schedule/ || calendar
#sitemap: /sitemap.xml || sitemap
#commonweal: /404/ || heartbeat

Local Search本地搜索
安装插件hexo-generator-searchdb,执行以下命令:

1
npm install hexo-generator-searchdb --save

修改hexo/_config.yml站点配置文件,新增以下内容到任意位置:

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

编辑 主题配置文件,启用本地搜索功能:

1
2
3
# Local search
local_search:
enable: true

————————————————
博客为博主原创,转载请评论说明并注明出处,谢谢

原文链接:https://blog.csdn.net/as480133937/article/details/100138838

前往图标库找到心仪的图标(我这里选择heartbeat)
打开主题配置文件themes\next_config.yml,搜索 footer → 将 name 后面的 user 替换成 fa-heartbeat → 将 animated 设置成 true → 将 color 修改为 #ff0000,如下图:

作者:虹猫日志
链接:https://www.jianshu.com/p/64caf29fdd0c
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。