butterfly主题魔改06:首页页面美化

01 首页顶部图大小

修改了主页标题距离顶部距离,主页top_img高度。
博客根目录下_config.butterfly.yml
文件。
1 2 3 4 5 6 7
|
index_site_info_top: 110px index_top_img_height: 300px
|
02 网站副标题

启用首页副标题,启用打字机效果,以及相关配置。
博客根目录下_config.butterfly.yml
文件。
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
| subtitle: enable: true effect: true loop: true typed_option: source: true sub: - '<i class="fas fa-quote-left"></i> 学无止境' - '<i class="fas fa-quote-left"></i> 千里之行,始于足下 —— 老子' - '<i class="fas fa-quote-left"></i> 读书破万卷,下笔如有神' - '<i class="fas fa-quote-left"></i> 吾日三省吾身' - '<i class="fas fa-quote-left"></i> 星光不问赶路人,时光不负有心人' - '<i class="fas fa-quote-left"></i> 人生没有白走的路,每一步都算数' - '<i class="fas fa-quote-left"></i> 保持热爱,奔赴山海' - '<i class="fas fa-quote-left"></i> 纸上得来终觉浅,绝知此事要躬行' - '<i class="fas fa-quote-left"></i> 成功的秘诀在于坚持' - '<i class="fas fa-quote-left"></i> The best way to predict the future is to invent it' - '<i class="fas fa-quote-left"></i> 生活是一场马拉松,你需要不断地奔跑' - '<i class="fas fa-quote-left"></i> 成功不是将来才有的,而是从决定去做的那一刻起,持续累积而成'
|
03 首页文章卡片双栏布局

首页文章双栏布局设置,文章摘要显示设置。
博客根目录下_config.butterfly.yml
文件的首页设置
的相关修改代码如下:
04 首页文章摘要显示设置
博客根目录下_config.butterfly.yml
文件。
1 2 3 4 5 6 7 8
|
index_post_content: method: 1 length: 300
|
05 首页文章置顶轮播插件及设置

- 安装插件
1
| npm install hexo-butterfly-swiper --save
|
- 在根目录的
_config.butterfly.yml
文件后添加以下代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
swiper: enable: true priority: 5 enable_page: / timemode: date layout: type: id name: recent-posts index: 0 default_descr: 再怎么看我也不知道怎么描述它的啦! swiper_css: https://npm.elemecdn.com/hexo-butterfly-swiper/lib/swiper.min.css swiper_js: https://npm.elemecdn.com/hexo-butterfly-swiper/lib/swiper.min.js custom_css: https://npm.elemecdn.com/hexo-butterfly-swiper/lib/swiperstyle.css custom_js: https://npm.elemecdn.com/hexo-butterfly-swiper/lib/swiper_init.js
|
- 在文章的头部添加属性
swiper_index
,置顶轮播图顺序,需填非负整数,数字越大越靠前