Hexo带过滤功能的首页插件

简介

带过滤功能的Hexo首页生成器插件。在官方的首页生成器基础上添加了过滤指定分类/标签的功能。比如,在首页只显示指定分类下面的文章列表。

English

安装

$ npm install hexo-generator-index2 --save
$ npm uninstall hexo-generator-index --save

选项

index_generator:
  per_page: 10
  order_by: -date
  include:
    - category Web # 只包含Web分类下的文章
  exclude:
    - tag Hexo # 不包含标签为Hexo的文章
  • per_page: Posts displayed per page. (0 = disable pagination)
  • order_by: Posts order. (Order by date descending by default)
  • include: Posts filter include option
  • exclude: Posts filter exclude option

除了include和exclude,其它如per_pageorder_by都是原有的官方首页生成器选项,不必更改。

Include/exclude 选项格式为属性 值(注意,属性与值中间有个英文的空格),可选的属性有:

  • category: 文章分类
  • tag: 文章标签
  • path: 文章源路径

传送门

https://github.com/Jamling/hexo-generator-index2
http://www.ieclipse.cn/2016/07/21/hexo-generator-index2/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值