npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hexo-butterfly-swiper-anzhiyu

v1.0.4

Published

A Slideshow plugin for theme-butterfly based on swiper

Downloads

95

Readme

hexo-butterfly-swiper-anzhiyu

hexo-theme-butterfly添加 首页轮播图 该项目为店长轮播图二开魔改 添加了随机逛逛

安装

  1. 安装插件,在博客根目录[Blogroot]下打开终端,运行以下指令:
npm install hexo-butterfly-swiper-anzhiyu --save
  1. 添加配置信息,以下为写法示例 在站点配置文件_config.yml或者主题配置文件_config.butterfly.yml中添加
  swiper:
    enable: true # 开关
    randomenable: true # 人潮汹涌开关
    priority: 5 #过滤器优先权
    enable_page: / # 应用页面
    timemode: date #date/updated
    layout: # 挂载容器类型
      type: id
      name: recent-posts
      index: 1
    default_descr: 再怎么看我也不知道怎么描述它的啦!
    swiper_css: https://cdn.cbd.int/hexo-butterfly-swiper-anzhiyu/lib/swiper.min.css #swiper css依赖
    swiper_js: https://cdn.cbd.int/[email protected]/js/swiper.min.js #swiper js依赖 #swiper js依赖
    custom_css: https://cdn.cbd.int/hexo-butterfly-swiper-anzhiyu/lib/swiperstyle.css # 适配主题样式补丁
    custom_js: https://cdn.cbd.int/hexo-butterfly-swiper-anzhiyu/lib/swiper_init.js # swiper初始化方法
    gsap_js: https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/gsap/3.9.1/gsap.min.js # gsap依赖 随机逛逛依赖
    people_js: https://cdn.cbd.int/hexo-butterfly-swiper-anzhiyu/js/people/people.js # 随机逛逛js
  1. 参数释义

|参数|备选值/类型|释义| |:--|:--|:--| |priority|number|【可选】过滤器优先级,数值越小,执行越早,默认为10,选填| |enable|true/false|【必选】控制开关| |randomenable|true/false|【必选】人潮汹涌控制开关| |enable_page|path/all|【可选】填写想要应用的页面的相对路径(即路由地址),如根目录就填'/',分类页面就填'/categories/'。若要应用于所有页面,就填'all',默认为all| |exclude|path|【可选】填写想要屏蔽的页面,可以多个。仅当enable_page为'all'时生效。写法见示例。原理是将屏蔽项的内容逐个放到当前路径去匹配,若当前路径包含任一屏蔽项,则不会挂载。| |timemode|date/updated|【可选】时间显示,date为显示创建日期,updated为显示更新日期,默认为date| |layout.type|id/class|【可选】挂载容器类型,填写id或class,不填则默认为id| |layout.name|text|【必选】挂载容器名称| |layout.index|0和正整数|【可选】前提是layout.type为class,因为同一页面可能有多个class,此项用来确认究竟排在第几个顺位| |error_img|url|封面图片加载失败时的替换图片| |insertposition|text|'beforebegin':元素自身的前面。'afterbegin':插入元素内部的第一个子节点之前。'beforeend':插入元素内部的最后一个子节点之后。'afterend':插入元素自身的后面。| |default_descr|text|【可选】默认文章描述| |swiper_css|url|【可选】自定义的swiper依赖项css链接| |swiper_js|url|【可选】自定义的swiper依赖项加js链接| |custom_css|url|【可选】适配主题样式补丁| |custom_js|url|【可选】swiper初始化方法| |gsap_js|url|【可选】gsap_js依赖| |people_js|url|【可选】随机逛逛js|

  1. 使用方法 在文章的front_matter中添加swiper_index配置项即可。
---
title: 文章标题
date: 创建日期
updated: 更新日期
cover: 文章封面
description: 文章描述
swiper_index: 1 #置顶轮播图顺序,需填非负整数,数字越大越靠前
---

截图