1.0.3 • Published 1 year ago

hexo-butterfly-categories-card-gabriel v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

hexo-butterfly-categories-card-gabriel

hexo-theme-butterfly添加 首页分类卡片

安装

  1. 安装插件,在博客根目录[Blogroot]下打开终端,运行以下指令:

    npm install hexo-butterfly-categories-card-gabriel --save
  2. 添加配置信息,以下为写法示例 在站点配置文件_config.yml或者主题配置文件_config.butterfly.yml中添加

    # hexo-butterfly-categories-card-gabriel
    # see https://github.com/lijiabao9/hexo-butterfly-categories-card-gabriel
    categoryBar:
      enable: true    # 开关
      priority: 5     # 过滤器优先权
      enable_page: /  # 应用页面
      layout: # 挂载容器类型
        type: id
        name: recent-posts
        index: 0
      column: odd     # odd:3列 | even:4列
      row: 1          # 显示行数,默认两行,超过行数切换为滚动显示
      message:
        - name: 前端开发
          descr: 前端方面的技术记录学习
          cover: https://cdn.jsdelivr.net/gh/lijiabao9/lijiabao9.pic.cloud@main/PicGo/202404162145545.png
        - name: 后端开发
        - descr: 后端方面的技术记录学习
          cover: https://cdn.jsdelivr.net/gh/lijiabao9/lijiabao9.pic.cloud@main/PicGo/202404162144144.png
      custom_css: https://cdn.jsdelivr.net/npm/hexo-butterfly-categories-card-gabriel/lib/categorybar.css
  3. 参数释义

    参数备选值/类型释义
    prioritynumber【可选】过滤器优先级,数值越小,执行越早,默认为10,选填
    enabletrue/false【必选】控制开关
    enable_pagepath/all【可选】填写想要应用的页面的相对路径(即路由地址),如根目录就填'/',分类页面就填'/categories/'。若要应用于所有页面,就填'all',默认为'/'
    layout.typeid/class【可选】挂载容器类型,填写id或class,不填则默认为id
    layout.nametext【必选】挂载容器名称
    layout.index0和正整数【可选】前提是layout.type为class,因为同一页面可能有多个class,此项用来确认究竟排在第几个顺位
    columnodd/even【可选】显示列数,考虑到比例问题,只提供3列和4列,odd为3列, even为4列
    rownumber【可选】显示行数,默认两行,超过行数切换为滚动显示
    message.nametext分类名称,需要和你自己的文章分类一一对应。
    message.descrtext分类描述,需要和你自己的文章分类一一对应。
    message.coverurl分类背景,需要和你自己的文章分类一一对应。
    custom_cssurl【可选】自定义样式,会替换默认的css链接,可以下载文档给出的cdn链接后自主修改

截图

npm.io

更新记录

  • 2024-04-27:1.0.3
    1. 基于 hexo-butterfly-categories-card 修改,增加 name 准确匹配分类
1.0.3

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago