展示效果

所以我们需要在首页的最顶端插入所需要的轮播图
安装插件
1 | npm install hexo-butterfly-swiper --save |
配置插件
在_config.butterfly.yml
下增加以下配置
1 | # hexo-butterfly-swiper |
插件参数
参数 | 备选值/类型 | 释义 | 是否必选 |
---|---|---|---|
priority |
number | 过滤器优先级,数值越小执行越早(默认:10) | 可选 |
enable |
true/false | 控制开关 | 必选 |
enable_page |
path/all |
应用页面的相对路径(如 / 或
/categories/ ),默认:all |
可选 |
timemode |
date /updated |
时间显示模式,默认:date |
可选 |
layout.type |
id /class |
挂载容器类型(默认:id ) |
可选 |
layout.name |
text | 挂载容器名称 | 必选 |
layout.index |
0和正整数 | 当 layout.type=class 时,指定 class 的索引位置 |
可选 |
default_descr |
text | 默认文章描述 | 可选 |
swiper_css |
url | 自定义 Swiper 的 CSS 依赖链接 | 可选 |
swiper_js |
url | 自定义 Swiper 的 JS 依赖链接 | 可选 |
custom_css |
url | 适配主题的 CSS 补丁文件 | 可选 |
custom_js |
url | Swiper 初始化的自定义 JS 文件 | 可选 |
展示文章
在文章的front_matter
处添加swiper_index
的配置即可
swiper_index #置顶轮播图顺序,非负整数,数字越大越靠前
description #文章描述,这里是轮播图展示的描述
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 ErgouTree's Blog!
评论
FPS: 60