social: fab fa-github:https://github.com/JimLeon595||Github||'#24292e' fab fa-bilibili:https://space.bilibili.com/5300885||Bilibili||'fb7299' fas fa-envelope:mailto:[email protected]||Email||'#4a7dbe'
# 文章封面 cover: # display the cover or not (主页是否显示文章封面图) index_enable:true # 侧栏是否显示文章封面图 aside_enable:true # 归档页面是否显示文章封面图 archives_enable:true # the position of cover in home page (封面显示的位置) # left/right/both position:both # When cover is not set, the default cover is displayed (当没有设置cover时,默认的封面显示) default_cover: # - https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg
# 页面 meta 显示 post_meta: # Home Page (主页) page: # created or updated or both 主页文章日期是创建日或者更新日或都显示 date_type:both # date/relative 显示日期还是相对日期 date_format:data # true or false 主页是否显示分类 categories:true # true or false 主页是否显示标签 tags:false # true or false 显示描述性文字 label:true # Post (文章) post: # created or updated or both 主页文章日期是创建日或者更新日或都显示 date_type:both # date/relative 显示日期还是相对日期 date_format:data # true or false 主页是否显示分类 categories:true # true or false 主页是否显示标签 tags:true # true or false 显示描述性文字 label:true
主题文章节选
因为主题UI的关系,主页文章节选只支持自动节选和文章页description。
1 2 3 4 5 6 7 8
# 1. description: 只显示description # 2. both: 优先选择description,如果没有配置description,则显示自动节选的内容 # 3. auto_excerpt: 只显示自动节选 # 4. false: 不显示文章内容 # 主题文章节选 index_post_content: method:2 length:500# if you set method to 2 or 3, the length need to config
页面锚点
开启页面锚点后,当你在进行滚动时,页面链接会根据标题ID进行替换
1 2 3 4 5 6 7 8
# anchor # 页面锚点 anchor: # when you scroll, the URL will update according to header id. # 开启页面锚点后,当你在进行滚动时,页面链接会根据标题ID进行替换 auto_update:false # Click the headline to scroll and update the anchor click_to_scroll:false
图片描述
可开启图片 Figcaption 描述文字显示
优先显示图片的 title 属性,然后是 alt 属性
1 2
# figcaption (图片描述文字) photofigcaption:false
Copy Settings (复制相关功能)
可配置网站是否可以复制
复制的内容是否添加版权信息
1 2 3 4 5 6 7 8 9 10 11
# copy settings (复制相关功能) # copyright: Add the copyright information after copied content (复制的内容后面加上版权信息) copy: # 是否开启网站复制权限 enable:true # 复制的内容后面加上版权信息 copyright: # 是否开启复制版权信息添加 enable:false # 字数限制,当复制文字大于这个字数限制时,将在复制的内容后面加上版权信息 limit_count:50
related_post: enable:true # Number of posts displayed # 显示推荐文章数目 limit:6 # or created or updated # 文章日期显示创建日或者更新日 date_type:created
# post_pagination (分页)
1 2 3 4 5 6 7 8 9
# post_pagination (分页) # value: 1 || 2 || false # 1: The 'next post' will link to old post # 1: 下一篇显示的是旧文章 # 2: The 'next post' will link to new post # 2: 下一篇显示的是新文章 # false: disable pagination # 关闭分页按钮 post_pagination:2
文章过期提醒
可设置是否显示文章过期提醒,以更新时间为基准。
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# Displays outdated notice for a post (文章过期提醒) noticeOutdate: enable:true # style: simple/flat style:flat # When will it be shown # 距离更新时间多少天才显示文章过期提醒 limit_day:365 # position: top/bottom position:top # 天数之前的文字 message_prev:Ithasbeen # 天数之后的文字 message_next:dayssincethelastupdate,thecontentofthearticlemaybeoutdated.
aside: # 是否启用侧边栏 enable:true # 是否隐藏侧边栏 hide:false # 是否启用侧边栏 button:true # display on mobile # 是否开启移动端 mobile:true # left or right # 侧边栏在左边/右边 position:left # 展示项目 display: # 是否开启存档 archive:true # 是否开启标签 tag:true # 是否开启分类 category:true # 作者卡片 card_author: # 是否开启 enable:true # 作者描述 description: # 跳转按钮 button: # 是否启用 enable:true icon:fabfa-github text:FollowMe link:https://github.com/xxxxxx # 公告卡片 card_announcement: # 是否开启 enable:true # 公告内容 content:ThisismyBlog # 历史文章卡片 card_recent_post: # 是否开启 enable:true # if set 0 will show all # 展示数量 limit:5 # date or updated # 文章日期按照创建日或者更新日 sort:date # Don't modify the setting unless you know how it works sort_order: # 分类卡片 card_categories: # 是否开启 enable:true # if set 0 will show all # 展示数量 limit:5 # none/true/false expand:none # Don't modify the setting unless you know how it works sort_order: # 标签卡片 card_tags: # 是否开启 enable:true # if set 0 will show all # 展示数量 limit:40 # 是否开启彩色 color:true # Order of tags, random/name/length # 排序方法:随机/名字/长度 orderby:random # Sort of order. 1, asc for ascending; -1, desc for descending # 排序方式 order:1 # Don't modify the setting unless you know how it works sort_order: # 存档卡片 card_archives: # 是否开启 enable:true # yearly or monthly # 按年还是按月展示 type:monthly # eg: YYYY年MM月 format:YYYYMMMM # Sort of order. 1, asc for ascending; -1, desc for descending # 排序方式 order:-1 # if set 0 will show all # 展示数量 limit:5 # Don't modify the setting unless you know how it works sort_order: # 网站资讯 card_webinfo: # 是否开启 enable:true # 文章数量 post_count:true # 最后更新时间 last_push_date:true # Don't modify the setting unless you know how it works sort_order: # 文章系列卡片 card_post_series: enable:true orderBy:'date'# Order by title or date order:-1# Sort of order. 1, asc for ascending; -1, desc for descending
# Time difference between publish date and now (网站运行时间) # Formal: Month/Day/Year Time or Year/Month/Day Time # 格式: 月/日/年 时间 也可以写成 年/月/日 时间 runtimeshow: enable:true publish_date:2020/01/2320:01:23
Aside widget - Newest Comments (最新评论)
本人不开启评论功能,所以跳过
Bottom Right Button (右下角按钮)
修改 _config.butterfly.yml 文件
简繁转换
文章文字简体繁体转换
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# Conversion between Traditional and Simplified Chinese (简繁转换) translate: # 是否开启翻译功能 enable:true # The text of a button # 默认按钮显示文字(网站是简体,应设置为'default: 繁') default:繁 # the language of website (1 - Traditional Chinese/ 2 - Simplified Chinese) # 网站默认语言,1: 繁体中文, 2: 简体中文 defaultEncoding:2 # Time delay # 延迟时间,若不在前,要设定延迟翻译时间,如100表示100ms,默认为0 translateDelay:0 # The text of the button when the language is Simplified Chinese # 当文字是简体时,按钮显示的文字 msgToTraditionalChinese:'繁' # The text of the button when the language is Traditional Chinese # 当文字是繁体时,按钮显示的文字 msgToSimplifiedChinese:'簡'
Read Mode (阅读模式)
阅读模式下会去掉除文章外的内容,避免干扰閲读。
只会出现在文章页面,右下角会有阅读模式按钮。
1 2
# Read Mode (阅读模式) readmode:true
Dark Mode (夜间模式)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# Dark Mode (夜间模式) darkmode: enable:true # Toggle Button to switch dark/light mode # 是否在右下角显示日夜模式切换按钮 button:true # Switch dark/light mode automatically (自动切换 dark mode和 light mode) # autoChangeMode: 1 Following System Settings, if the system doesn't support dark mode, it will switch dark mode between 6 pm to 6 am # autoChangeMode: 1 跟随系统而变化,不支持的浏览器/系统将按照时间 start 到 end 之间切换为 light mode # autoChangeMode: 2 Switch dark mode between 6 pm to 6 am # autoChangeMode: 2 只按照时间 start 到 end 之间切换为 light mode ,其余时间为 dark mode # autoChangeMode: false # autoChangeMode: false 取消自动切换 autoChangeMode:false # Set the light mode time. The value is between 0 and 24. If not set, the default value is 6 and 18 # light mode 的开始时间 start:# 6 # light mode 的结束时间 end:# 18
滚动状态百分比
1 2
# show scroll percent in scroll-to-top button (滚动状态百分比) rightside_scroll_percent:true
按钮排序
自定义按钮展示/隐藏功能
1 2 3 4 5 6 7
# Don't modify the following settings unless you know how they work (非必要請不要修改 ) # Choose: readmode,translate,darkmode,hideAside,toc,chat,comment # Don't repeat 不要重複 rightside_item_order: enable:false hide:# readmode,translate,darkmode,hideAside show:# toc,chat,comment
# The top_img settings of home page # 主页图片大小 # default: top img - full screen, site info - middle (默认的显示为全屏。site-info的区域会居中显示) # 使用默认, 都无需填写(建议默认) # The position of site info, eg: 300px/300em/300rem/10% (主页标题距离顶部距离) index_site_info_top: # The height of top_img, eg: 300px/300em/300rem (主页top_img高度) index_top_img_height:
其他分区主页
建议默认即可
1 2 3 4 5
# The user interface setting of category and tag page (category和tag页的UI设置) # index - same as Homepage UI (index 值代表 UI将与首页的UI一样) # default - same as archives UI 默认跟a rchives 页面UI一样 category_ui:# 留空或 index tag_ui:# 留空或 index
文字左右对齐
1 2 3
# 文字左右对齐 # Stretches the lines so that each line has equal width(文字向两侧对齊,对最后一行无效) text_align_justify:true
# canvas_nest # https://github.com/hustcc/canvas-nest.js canvas_nest: # 是否开启功能 enable:false # 线条颜色 color:'0,0,255'#color of lines, default: '0,0,0'; RGB values: (R,G,B).(note: use ',' to separate.) opacity:0.7# the opacity of line (0~1), default: 0.5. zIndex:-1# z-index property of the background, default: -1. # the number of lines, default: 99. # 出现的线条数,默认为 99 条。 count:99 # 是否在移动端开启该功能 mobile:false
# Global font settings (自定义字体设置) # Don't modify the following settings unless you know how they work (非必要不要修改) font: # 全局字体大小 global-font-size: # 代码字体大小 code-font-size: # 全局字体 font-family:LXGW,sans-serif # 代码字体 code-font-family:Consolas,sans-serif
# Font settings for the site title and site subtitle # 左上角网站名字 主頁居中网站名字 blog_title_font: font_link: font-family:LXGW,sans-serif