# 2、网址URL(推荐改url,不推荐改permalink) ## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project' url:https://ruiqingyan.com# 页面底部分享的url(就是做好博客之后每页都有分享页面) permalink::year/:month/:day/:title/# 文章的永久链接格式 permalink_defaults:# 永久链接中每个段的默认值 pretty_urls: trailing_index:true# 尾随index.html,设置为false以删除它 true trailing_html:true# 跟踪.html,设置为false以删除它(不适用于跟踪index.html) true
### 10、一些其他 # Category & Tag default_category:uncategorized category_map: tag_map:
# Metadata elements ## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta meta_generator:true
# Date / Time format ## Hexo uses Moment.js to parse and display date ## You can customize the date format as defined in ## http://momentjs.com/docs/#/displaying/format/ date_format:YYYY-MM-DD time_format:HH:mm:ss ## updated_option supports 'mtime', 'date', 'empty' updated_option:'mtime'
# Include / Exclude file(s) ## include:/exclude: options only apply to the 'source/' folder include: exclude: ignore:
# ---------------------------------------------------------------------------- # 7、 顶部图 top_img # ---------------------------------------------------------------------------- disable_top_img:false index_img:/img/bg1.jpg default_top_img:/img/rd1.jpg archive_img:/img/rd2.jpg tag_img:/img/rd3.jpg # The banner image of tag page # format: # - tag name: xxxxx tag_per_img: category_img:/img/rd4.jpg # The banner image of category page # format: # - category name: xxxxx category_per_img:
8、文章封面
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
cover: # display the cover or not (文章封面) index_enable:true aside_enable:true archives_enable:true # 封面显示的位置 # 三个值可配置 left , right , both position:both # 没有配置cover时候默认显示的cover图 default_cover: -https://ruiqingyan.oss-cn-shenzhen.aliyuncs.com/RuiqyBlog/rd5.jpg -https://ruiqingyan.oss-cn-shenzhen.aliyuncs.com/RuiqyBlog/rd6.jpg -https://ruiqingyan.oss-cn-shenzhen.aliyuncs.com/RuiqyBlog/rd7.jpg -https://ruiqingyan.oss-cn-shenzhen.aliyuncs.com/RuiqyBlog/rd8.jpg -https://ruiqingyan.oss-cn-shenzhen.aliyuncs.com/RuiqyBlog/rd9.jpg
post_meta: page: date_type:both# created or updated or both 主页文章日期是创建日或者更新日或都显示 date_format:data# date/relative 显示日期还是相对日期 categories:true# true or false 主页是否显示分类 tags:true# true or false 主页是否显示标签 label:true# true or false 显示描述性文字 post: date_type:both# created or updated or both 文章页日期是创建日或者更新日或都显示 date_format:data# date/relative 显示日期还是相对日期 categories:true# true or false 文章页是否显示分类 tags:true# true or false 文章页是否显示标签 label:true# true or false 显示描述性文字
主页(左边的描述信息)
文章页(上面的描述信息)
相对时间
明确时间
10、主页文章节选(自动节选和文章页description)
图左下的文章内容描述
1 2 3 4 5 6 7
index_post_content: # 1表示description: 只显示description # 2表示both: 优先选择description,如果没有配置description,则显示自动节选的内容 # 3表示auto_excerpt:只显示自动节选 # 4表示false: 不显示文章内容 method:3 length:500# if you set method to 2 or 3, the length need to config
# anchor anchor: # when you scroll, the URL will update according to header id. auto_update:false # Click the headline to scroll and update the anchor click_to_scroll:false
12、图片描述
可开启图片Figcaption描述文字显示
优先显示图片的 title 属性,然后是 alt 属性
1
photofigcaption:true
13、复制相关配置
可配置网站是否可以复制、复制的内容是否添加版权信息
1 2 3 4 5 6 7
# copy settings # copyright: Add the copyright information after copied content (複製的內容後面加上版權信息) copy: enable:true#是否可以复制 copyright: enable:false#复制是否加版权 limit_count:1000#加版权的话字数超多多少才加
toc: post:true page:true number:true expand:false style_simple:false# for post scroll_percent:true
属性
解释
post
文章页是否显示 TOC
page
普通页面是否显示 TOC
number
是否显示章节数
expand
是否展开 TOC
style_simple
简洁模式(侧边栏只显示 TOC, 只对文章页有效 )
scroll_percent
是否显示滚动进度百分比
14.4 相关文章
1 2 3 4
related_post: enable:true limit:6# 显示推荐文章数目 date_type:created# or created or updated 文章日期显示创建日或者更新日
14.5 文章过期提醒
设置文章过期提醒(我没用)
1 2 3 4 5 6 7 8
# Displays outdated notice for a post (文章过期提醒) noticeOutdate: enable:true style:flat# style: simple/flat limit_day:365# When will it be shown position:top# position: top/bottom message_prev:Ithasbeen message_next:dayssincethelastupdate,thecontentofthearticlemaybeoutdated.
14.6 文章编辑按钮
可以理解成直接到github编辑文章,我觉得没什么用,需要的可以自行配置
1 2 3 4 5 6 7
# Post edit # Easily browse and edit blog source code online. post_edit: enable:false # url: https://github.com/user-name/repo-name/edit/branch-name/subdirectory-name/ # For example: https://github.com/jerryc127/butterfly.js.org/edit/main/source/ url:
aside: enable:true hide:false button:true mobile:true# display on mobile position:right# left or right 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 limit:5# if set 0 will show all sort:date# date or updated sort_order:# Don't modify the setting unless you know how it works card_categories: enable:true limit:8# if set 0 will show all expand:none# none/true/false sort_order:# Don't modify the setting unless you know how it works card_tags: enable:true limit:40# if set 0 will show all color:false orderby:random# Order of tags, random/name/length order:1# Sort of order. 1, asc for ascending; -1, desc for descending sort_order:# Don't modify the setting unless you know how it works card_archives: enable:true type:monthly# yearly or monthly format:MMMMYYYY# eg: YYYY年MM月 order:-1# Sort of order. 1, asc for ascending; -1, desc for descending limit:8# if set 0 will show all sort_order:# Don't modify the setting unless you know how it works card_webinfo: enable:true post_count:true last_push_date:true sort_order:# Don't modify the setting unless you know how it works 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
# Aside widget - Newest Comments newest_comments: enable:true sort_order:# Don't modify the setting unless you know how it works limit:6#数量 storage:10# 缓存时间,单位分钟 avatar:true# 是否显示头像
# dark mode darkmode: enable:true # dark mode和 light mode切换按钮 button:true autoChangeMode:false# 1表示跟随系统变化,2表示按照时间变换,false表示不变换 # Set the light mode time. The value is between 0 and 24. If not set, the default value is 6 and 18 start:# 8 end:# 22
17.4滚动状态百分比
1 2
# show scroll percent in scroll-to-top button rightside_scroll_percent:true
17.5 按钮排序
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
🌺(常用)18、标签外挂(Tag Plugins)
标签外挂是Hexo独有的功能,并不是标准的Markdown格式。
以下的写法,只适用于Butterfly主题,用在其它主题上不会有效果,甚至可能会报错。使用前请留意
18.1 Note(Bootstrap Callout)
1 2 3 4 5 6 7 8 9 10 11 12 13
note: # Note tag style values: # - simple bs-callout old alert style. Default. # - modern bs-callout new (v2-v3) alert style. # - flat flat callout style with background, like on Mozilla or StackOverflow. # - disabled disable all CSS styles import of note tag. style:simple icons:false border_radius:3 # Offset lighter of background in % for modern and flat styles (modern: -12 | 12; flat: -18 | 6). # Offset also applied to label tag variables. This option can work with disabled note tag. light_bg_offset:0
This is my website, click the button {% btn 'https://butterfly.js.org/',Butterfly %} This is my website, click the button {% btn 'https://butterfly.js.org/',Butterfly,far fa-hand-point-right %} This is my website, click the button {% btn 'https://butterfly.js.org/',Butterfly,,outline %} This is my website, click the button {% btn 'https://butterfly.js.org/',Butterfly,far fa-hand-point-right,outline %} This is my website, click the button {% btn 'https://butterfly.js.org/',Butterfly,far fa-hand-point-right,larger %}
This is my website, click the button Butterfly This is my website, click the button Butterfly This is my website, click the button Butterfly This is my website, click the button Butterfly This is my website, click the button Butterfly