Front-matter

​ 是档案最上方以 — 分隔的区域,用于指定个别档案的变数。(*为必须);

​ 应用于hexo butterfly主题

Page Front-matter

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
---
title:
date:
updated:
type:
comments:
description:
keywords:
top_img:
mathjax:
katex:
aside:
aplayer:
highlight_shrink:
---
写法 解释
title 页面标题*
data 页面创建时间*
type 标题分类友链三个页面需要配置的参数*
updated 页面更新时间
description 页面描述
keywords 页面关键字
comments 是否显示评论模块(true/false)
top_img 页面顶部图片
mathjax 显示mathjax(当设置mathjax的per_page: false时,才需要配置,默认 false)
ketex 显示katex(当设置katex的per_page: false时,才需要配置,默认 false)
aside 显示侧边栏 (默认 true)
aplayer 在需要的页面加载aplayer的js和css,
highlight_shrink 配置代码框是否展开(true/false)(默认为设置中highlight_shrink的配置)

Post Front-matter

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---
title:
date:
updated:
tags:
categories:
keywords:
description:
sticky:
top_img:
comments:
cover:
toc:
toc_number:
copyright:
copyright_author:
copyright_author_href:
copyright_url:
copyright_info:
mathjax:
katex:
aplayer:
highlight_shrink:
aside:
写法 解释
title 文章标题*
date 文章创建日期*
updated 文章更新日期
tags 文章标题
categories 文章分类
keywords 文章关键字
description 文章描述
sticky 顶置文章(number)数值越大,置顶的优先级越大
top_img 文章顶部图片
cover 文章缩略图(如果没有设置top_img,文章页顶部将显示缩略图,可设为false/图片地址/留空)
comments 显示文章评论模块
toc 显示文章TOC(默认为设置中toc的enable配置)
toc_number 显示toc_number(默认为设置中toc的number配置)
copyright 显示文章版权模块(默认为设置中post_copyright的enable配置)
copyright_author 文章版权模块的文章作者
copyright_author_href 文章版权模块的文章作者链接
copyright_url 文章版权模块的文章连结链接
copyright_info 文章版权模块的版权声明文字
mathjax 显示mathjax(当设置mathjax的per_page: false时,才需要配置,默认 false)
katex 显示katex(当设置katex的per_page: false时,才需要配置,默认 false)
aplayer 在需要的页面加载aplayer的js和css,请参考文章下面的音乐 配置
highlight_shrink 配置代码框是否展开(true/false)(默认为设置中highlight_shrink的配置)
aside 显示侧边栏 (默认 true)

Gallery相册图库

图库页面只是普通的页面,你只需要hexo n page xxxxx 例:hexo n page Gallery创建你的页面就行

然后使用标签外挂 galleryGroup,把代码内容粘入创建的页面里(Gallery.md)更改相应的图库名、图库描述等!

1
2
3
4
5
<div class="gallery-group-main">
{% galleryGroup name description link img-url %}
{% galleryGroup name description link img-url %}
{% galleryGroup name description link img-url %}
</div>
  • name:图库名字
  • description:图库描述
  • link:连接到对应相册的地址
  • img-url:图库封面的地址

例如:

1
2
3
4
5
<div class="gallery-group-main">
{% galleryGroup '壁纸' '收藏的一些壁纸' '/Gallery/wallpaper' https://i.loli.net/2019/11/10/T7Mu8Aod3egmC4Q.png %}
{% galleryGroup '漫威' '关于漫威的图片' '/Gallery/marvel' https://i.loli.net/2019/12/25/8t97aVlp4hgyBGu.jpg %}
{% galleryGroup 'OH MY GIRL' '关于OH MY GIRL的图片' '/Gallery/ohmygirl' https://i.loli.net/2019/12/25/hOqbQ3BIwa6KWpo.jpg %}
</div>

Gallery相册图库

子页面也是普通的页面,你只需要hexo n page xxxxx 例:hexo n page wallpaper创建你的页面就行

然后使用标签外挂 gallery,把图片用markdown格式插入到你创建的页面里(wallpaper.md)

1
2
3
{% gallery %}
markdown 图片格式
{% endgallery %}

例如

1
2
3
4
5
6
7
8
9
10
{% gallery %}
![](https://i.loli.net/2019/12/25/Fze9jchtnyJXMHN.jpg)
![](https://i.loli.net/2019/12/25/ryLVePaqkYm4TEK.jpg)
![](https://i.loli.net/2019/12/25/gEy5Zc1Ai6VuO4N.jpg)
![](https://i.loli.net/2019/12/25/d6QHbytlSYO4FBG.jpg)
![](https://i.loli.net/2019/12/25/6nepIJ1xTgufatZ.jpg)
![](https://i.loli.net/2019/12/25/E7Jvr4eIPwUNmzq.jpg)
![](https://i.loli.net/2019/12/25/mh19anwBSWIkGlH.jpg)
![](https://i.loli.net/2019/12/25/2tu9JC8ewpBFagv.jpg)
{% endgallery %}