Butterfly 主题配置详解(上)
本文详细说明 Butterfly 主题的各项配置选项。所有配置都在 _config.butterfly.yml 文件中进行。
导航栏设置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| nav: logo: display_title: true display_post_title: true fixed: false
menu:
|
代码块设置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| code_blocks: theme: light macStyle: false height_limit: false word_wrap: false
copy: true language: true shrink: false fullpage: false
|
社交媒体链接
格式为:图标: 链接 || 描述 || 颜色
图片设置
基本图片配置
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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| favicon: /img/favicon.png
avatar: img: /img/avatar.png effect: false
disable_top_img: false
default_top_img:
index_img:
archive_img:
tag_img:
tag_per_img:
category_img:
category_per_img:
footer_img: false
background:
|
封面设置
1 2 3 4 5 6 7 8 9 10 11 12
| cover: index_enable: true aside_enable: true archives_enable: true position: both default_cover:
|
错误图片替换
1 2 3 4 5
| error_img: flink: /img/friend_404.gif post_page: /img/404.jpg
|
404 页面
1 2 3 4 5 6 7
| error_404: enable: false subtitle: 'Page Not Found' background: /img/error-page.png
|
文章元数据设置
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
| post_meta: page: date_type: created date_format: date categories: true tags: false label: true post: position: left date_type: both date_format: date categories: true tags: true label: true
|
首页设置
首页头图设置
1 2 3 4 5 6
|
index_site_info_top:
index_top_img_height:
|
首页副标题设置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| subtitle: enable: false effect: true typed_option: source: false sub:
|
首页文章布局
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
index_layout: 1
index_post_content: method: 3 length: 500
|
文章设置
目录(TOC)设置
1 2 3 4 5 6 7 8 9 10 11 12 13
| toc: post: true page: false number: true expand: false style_simple: false scroll_percent: true
|
文章版权设置
1 2 3 4 5 6 7 8 9 10 11
| post_copyright: enable: true decode: false author_href: license: CC BY-NC-SA 4.0 license_url: https://creativecommons.org/licenses/by-nc-sa/4.0/
|
打赏设置
1 2 3 4 5 6 7 8 9 10 11 12
| reward: enable: false text: QR_code:
|
文章编辑
1 2 3 4 5 6
| post_edit: enable: false url:
|
相关文章
1 2 3 4 5 6 7
| related_post: enable: true limit: 6 date_type: created
|
文章分页
文章过期提醒
1 2 3 4 5 6 7 8 9 10 11
| noticeOutdate: enable: false style: flat limit_day: 365 position: top message_prev: 已经过了 message_next: 天自上次更新,文章内容可能已过时。
|
页脚设置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| footer: nav: owner: enable: true since: 2019 custom_text: copyright: enable: true version: true
|
下篇预告
下篇将继续介绍侧边栏设置、右下角按钮、全局设置、数学公式、搜索、评论系统等配置选项。