Butterfly 主题配置详解(下)
本文继续介绍 Butterfly 主题的高级配置选项。
侧边栏设置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| aside: enable: true hide: false button: true mobile: true position: right display: archive: true tag: true category: true
|
侧边栏卡片配置
作者信息卡片
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| card_author: enable: true description: button: enable: true icon: fab fa-github text: Follow Me link: https://github.com/xxxxxx
|
公告卡片
1 2 3 4 5
| card_announcement: enable: true content: This is my Blog
|
最近文章卡片
1 2 3 4 5 6 7 8
| card_recent_post: enable: true limit: 5 sort: date sort_order:
|
最新评论卡片
1 2 3 4 5 6 7 8 9 10
| card_newest_comments: enable: false sort_order: limit: 6 storage: 10 avatar: true
|
分类卡片
1 2 3 4 5 6 7 8
| card_categories: enable: true limit: 8 expand: none sort_order:
|
标签卡片
1 2 3 4 5 6 7 8 9 10 11 12
| card_tags: enable: true limit: 40 color: false orderby: random order: 1 sort_order:
|
归档卡片
1 2 3 4 5 6 7 8 9 10 11 12
| card_archives: enable: true type: monthly format: MMMM YYYY order: -1 limit: 8 sort_order:
|
系列文章卡片
1 2 3 4 5 6 7 8 9
| card_post_series: enable: true series_title: false orderBy: 'date' order: -1
|
网站信息卡片
1 2 3 4 5 6 7 8 9 10 11 12
| card_webinfo: enable: true post_count: true last_push_date: true sort_order: runtime_date:
|
右下角按钮设置
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 46 47 48 49 50
| rightside_bottom:
translate: enable: false default: 繁 defaultEncoding: 2 translateDelay: 0 msgToTraditionalChinese: '繁' msgToSimplifiedChinese: '简'
readmode: true
darkmode: enable: true button: true autoChangeMode: false start: end:
rightside_scroll_percent: false
rightside_item_order: enable: false hide: show:
rightside_config_animation: true
|
全局设置
锚点设置
1 2 3 4 5
| anchor: auto_update: false click_to_scroll: false
|
图片标题
复制设置
1 2 3 4 5 6 7 8
| copy: enable: true copyright: enable: false limit_count: 150
|
字数统计
1 2 3 4 5 6 7 8 9 10
| wordcount: enable: false post_wordcount: true min2read: true total_wordcount: true
|
网站统计
1 2 3 4 5 6 7 8
| busuanzi: site_uv: true site_pv: true page_pv: true
|
数学公式设置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| math: use: per_page: true hide_scrollbar: false
mathjax: enableMenu: true tags: none
katex: copy_tex: 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
| search: use: placeholder:
algolia_search: hitsPerPage: 6
local_search: preload: false top_n_per_article: 1 unescape: false pagination: enable: false hitsPerPage: 8 CDN:
docsearch: appId: apiKey: indexName: option:
|
分享系统
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| share: use: sharejs
sharejs: sites: facebook,x,wechat,weibo,qq
addtoany: item: facebook,x,wechat,sina_weibo,facebook_messenger,email,copy_link
|
评论系统
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| comments: use: text: true lazyload: false count: false card_post_count: false
|
聊天服务
1 2 3 4 5 6 7 8 9
| chat: use: rightside_button: false button_hide_show: 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
| baidu_analytics:
google_analytics:
cloudflare_analytics:
microsoft_clarity:
umami_analytics: enable: false serverURL: script_name: script.js website_id: option: UV_PV: site_uv: false site_pv: false page_pv: false token:
google_tag_manager: tag_id: domain:
|
广告设置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| google_adsense: enable: false auto_ads: true js: https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js client: enable_page_level_ads: true
ad: index: aside: post:
|
CDN 设置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| CDN: internal_provider: local third_party_provider: jsdelivr
version: true
custom_format:
option:
|
总结
通过合理配置这些选项,你可以完全自定义 Butterfly 主题的外观和功能,打造一个独特的博客。建议根据自己的需求逐步调整配置,以获得最佳的用户体验。