avatar

hexo-theme-butterfly 安装文档(二)主题页面

本文转载自 https://jerryc.me/posts/dc584b87/#Page-Front-matter

Page Front-matter

1
2
3
4
5
6
7
8
9
10
11
--- 
title:
date:
type: (tags,link,categories这三个页面需要配置)
comments: (是否需要显示评论,默认true)
description:
top_img: (设置顶部图)
mathjax:
katex:
aside:
-- -

Post Front-matte

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- 
title:
date:
tags:
categories:
keywords:
description:
top_img: (除非特定需要,可以不写)
comments是否显示评论(除非设置false,可以不写)
cover:缩略图
toc:是否显示toc (除非特定文章设置,可以不写)
toc_number:是否显示toc数字(除非特定文章设置,可以不写)
copyright:是否显示版权(除非特定文章设置,可以不写)
mathjax:
katex:
hide:
---

标签页

  1. 前往你的Hexo 博客的根目录

  2. 输入 hexo new page tags

  3. 你会找到source/tags/index.md这个文件

  4. 修改这个文件:

1
2
3
4
5
6
--- 
title:标签
date: 2018-01-05 00:00:00
type: "tags"
comments: false
---

分类页

  1. 前往你的Hexo 博客的根目录

  2. 输入 hexo new page categories

  3. 你会找到source/categories/index.md这个文件

  4. 修改这个文件:

1
2
3
4
5
6
--- 
title:分类
date: 2018-01-05 00:00:00
type: "categories"
comments: false
---

友情链接

为你的博客创建一个友情链接!

创建友情链接页面

  1. 前往你的 Hexo 博客的根目录

  2. 输入 hexo new page link

  3. 你会找到source/link/index.md这个文件

  4. 修改这个文件:

1
2
3
4
5
6
--- 
title:友情链接
date: 2018-06-07 22:17:49
type: "link"
comments: false
---

友情链接添加

在Hexo博客目录中的source/_data,创建一个文件link.yml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class:
class_name: 友情鏈接
link_list:
1:
name: xxx
link: https://blog.xxx.com
avatar: https://cdn.xxxxx.top/avatar.png
descr: xxxxxxx
2:
name: xxxxxx
link: https://www.xxxxxxcn/
avatar: https://xxxxx/avatar.png
descr: xxxxxxx

class2:
class_name: 鏈接無效
link_list:
1:
name: 夢xxx
link: https://blog.xxx.com
avatar: https://xxxx/avatar.png
descr: xxxx
2:
name: xx
link: https://www.axxxx.cn/
avatar: https://x
descr: xx

友情鏈接界面設置

由 2.2.0 起,友情鏈接界面可以由用户自己自定義,只需要在友情鏈接的 md 檔設置就行,以普通的 Markdown 格式書寫。

音樂

音樂界面使用了插件 https://github.com/MoePlayer/hexo-tag-aplayer。

使用方法請參考插件的文檔。

音樂頁面只是普通的 page 頁,按普通頁面操作生成就行。

電影

電影界面使用了插件 https://github.com/mythsman/hexo-douban。

使用方法請參考插件的文檔。

注意:hexo-douban 會主動生成頁面,所以不需要自己創建。對應網頁的 top_img 可以 butterfly.yml 修改。

404 頁面

主題內置了一個簡單的 404 頁面,可在設置中開啟

1
2
3
4
5
# A simple 404 page
error_404:
enable: true
subtitle: "頁面沒有找到"
background:

img

文章作者: Wu Fei
文章链接: http://linuxwf.com/2020/04/08/hexo-theme-butterfly-%E5%AE%89%E8%A3%85%E6%96%87%E6%A1%A3%EF%BC%88%E4%BA%8C%EF%BC%89%E4%B8%BB%E9%A2%98%E9%A1%B5%E9%9D%A2/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 WF's Blog
打赏
  • 微信
    微信
  • 支付宝
    支付宝

评论