Front-matter
Front-matter 是 markdown 文件最上方以 — 分隔的区域,用于指定个别档案的变数。
Page Front-matter 用于 页面 配置
Post Front-matter 用于 文章页 配置
如果标注可选的参数,可根据自己需要添加,不用全部都写在 markdown 里
Page Front-matter
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| --- title: date: updated: type: comments: description: keywords: top_img: mathjax: katex: aside: aplayer: highlight_shrink: random: limit: type: value: ---
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| 参数 解释 title 【必需】页面标题 date 【必需】页面创建日期 type 【必需】标签、分类和友情链接三个页面需要配置 updated 【可选】页面更新日期 description 【可选】页面描述 keywords 【可选】页面关键字 comments 【可选】显示页面评论模块 (默认 true) top_img 【可选】页面顶部图片 mathjax 【可选】显示 mathjax (当设置 mathjax 的 per_page: false 时,才需要配置,默认 false) katex 【可选】显示 katex (当设置 katex 的 per_page: false 时,才需要配置,默认 false) aside 【可选】显示侧边栏 (默认 true) aplayer 【可选】在需要的页面加载 aplayer 的 js 和 css,请参考文章下面的音乐 配置 highlight_shrink 【可选】配置代码框是否展开 (true/false) (默认为设置中 highlight_shrink 的配置) random 【可选】配置友情链接是否随机排序(默认为 false) limit 【可选】配置説説显示数量 limit.type 【可选】配置説説显示数量的类型 (date 或者 num) limit.value 【可选】配置説説显示数量的值
|
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 25 26 27
| --- title: date: updated: tags: categories: keywords: description: top_img: comments: cover: toc: toc_number: toc_style_simple: copyright: copyright_author: copyright_author_href: copyright_url: copyright_info: mathjax: katex: aplayer: highlight_shrink: aside: abcjs: noticeOutdate: ---
|
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
| 写法 解释 title 【必需】文章标题 date 【必需】文章创建日期 updated 【可选】文章更新日期 tags 【可选】文章标签 categories 【可选】文章分类 keywords 【可选】文章关键字 description 【可选】文章描述 top_img 【可选】文章顶部图片 cover 【可选】文章缩略图(如果没有设置 top_img,文章页顶部将显示缩略图,可设为 false/图片地址/留空) comments 【可选】显示文章评论模块(默认 true) toc 【可选】显示文章 TOC(默认为设置中 toc 的 enable 配置) toc_number 【可选】显示 toc_number(默认为设置中 toc 的 number 配置) toc_style_simple 【可选】显示 toc 简洁模式 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) abcjs 【可选】加载 abcjs (当设置 abcjs 的 per_page: false 时,才需要配置,默认 false ) noticeOutdate 【可选】文章过期提醒 (默认为设置中 noticeOutdate 的 enable 配置)
|
标签页
标签页文件名不一定是 tags, 例子中的 tags 只是一个示例
记得添加 type: “tags”
1.前往你的 Hexo 的根目录
2.输入 hexo new page tags
3.你会找到 source/tags/index.md 这个文件
4.修改这个文件:
1 2 3 4 5
| title: 标签 date: 2018-01-05 00:00:00 type: 'tags' orderby: random order: 1
|
1 2 3 4 5
| 参数 解释 type 【必须】页面类型,必须为 tags orderby 【可选】排序方式 : random - 随机排序 / name - 标签名字排序 / length - 标签数量排序 order 【可选】排序次序: 1(升序),-1(降序)
|
分类页
分类页文件名不一定是 categories, 例子中的 categories 只是一个示例
记得添加 type: “categories”
1.前往你的 Hexo 的根目录
2.输入 hexo new page categories
3.你会找到 source/categories/index.md 这个文件
4.修改这个文件:
1 2 3 4 5
| --- title: 分类 date: 2018-01-05 00:00:00 type: 'categories' ---
|
友情链接
为你的博客创建一个友情链接!
创建友情链接页面
友情链接页文件名不一定是 link, 例子中的 link 只是一个示例
记得添加 type: “link”
前往你的 Hexo 的根目录
输入 hexo new page link
你会找到 source/link/index.md 这个文件
修改这个文件:
1 2 3 4 5
| --- title: 友情链接 date: 2018-06-07 22:17:49 type: 'link' ---
|
📌 Butterfly 文档(三) 主题配置
文章作者: Jerry
文章连结: https://butterfly.js.org/posts/dc584b87/
版权声明: 除特别声明外,本博客所有文章均採用CC BY-NC-SA 4.0 授权协议。转载请注明出处:Butterfly。
作者: Jerry
連結: https://butterfly.js.org/posts/dc584b87/
來源: Butterfly
版權屬於作者所有。商業用途請聯絡作者獲得授權,非商業用途請註明出處。