hexo-Butterfly-全局设置(安装、标题、菜单、图标、顶部、页脚、侧边栏、图片设置)
Butterfly是hexo的一个主题,具体效果可以参考我的博客
Butterfly安装
1 | git clone -b master https://gitee.com/immyw/hexo-theme-butterfly.git |
Butterfly主题应用
hexo根目录下_config.yml设置theme: Butterfly
全局设置(标题)
网站资料、语言_config.yml:
title、subject等
配置 default(en) zh-CN (简体中文) zh-TW (繁体中文)
在 hexo 的根目錄創建一個文件 _config.butterfly.yml,並把主題目錄的_config.yml內容複製到_config.butterfly.yml去。( 注意: 複製的是主題的 _config.yml ,而不是 hexo 的 _config.yml)
菜单_config.butterfly.yml:
菜单名: 路径 || 图标 || hide
子菜单: 路径 || 图标
默认子目录是展开的,如果你想要隐藏,在子目录里添加 hide
1 | Categories: /categories/ || fas fa-folder-open |
导航栏
1 | nav: |
logo 网站的 logo,支持图片,直接填入图片链接
display_title 是否显示网站标题,填写 true 或者 false
fixed 是否固定状态栏,填写 true 或者 false
图标设置 直达->
要使用iconfont图标的地方:
iconfont wy-setting
1 | inject: |
字数统计 npm install hexo-wordcount 修改:wordcount
顶部图
disable_top_img: true 禁止顶部图
index_img 主页的 top_img
default_top_img 默认的 top_img,当页面的 top_img 没有配置时,会显示 default_top_img
archive_img 归档页面的 top_img
tag_img tag 子页面 的 默认 top_img
tag_per_img tag 子页面的 top_img,可配置每个 tag 的 top_img
category_img category 子页面 的 默认 top_img
category_per_img category 子页面的 top_img,可配置每个 category 的 top_img
页脚,用于备案等:footer
since是一个来展示你站点起始时间的选项
custom_text:页脚自定义文本的选项,支持 HTML
1 | custom_text: <a href="icp链接"><img class="icp-icon" src="icp图片"><span>备案号:xxxxxx</span></a> |
侧边栏
作者卡片
card_author
公告卡片
card_announcement:
访问人数 busuanzi (UV 和 PV)
网页已运行时间 runtimeshow
自定义侧边栏 ->直达
背景、特效
- 背景
1
2
3
4# 图片格式 url(http://xxxxxx.com/xxx.jpg) 本地:url(/blog/img/xx.png)
# 颜色(HEX值/RGB值/顔色单词/渐变色) background:'#49B202'
# 留空 不显示背景
background: url(/blog/img/xx.png) - 彩带 ->直达
canvas_ribbon - 鼠标->直达
fireworks烟花click_heart:爱心ClickShowText:文字 - 打字效果
activate_power_mode - 页面加载动画
preloader
文章图片 封面 cover
1 | cover |



