项目作者: dimonpanik

项目描述 :
Plugin helps to sort posts by required fields
高级语言: JavaScript
项目地址: git://github.com/dimonpanik/hexo-custom-sort.git
创建时间: 2020-09-16T06:34:21Z
项目社区:https://github.com/dimonpanik/hexo-custom-sort

开源协议:MIT License

下载


hexo-custom-sort

Downloads npm LICENSE

Plugin helps to sort posts by required fields

Usage

in _config.yml

  1. custom_sort:
  2. params: [one,two]
  3. pathPage: 'optional'
  4. perPage: 'optional'

All selected parameters will be moved to locals

  1. param.name = Name no slugize
  2. param.path = slugize path

Example:
_config.yml

  1. custom_sort:
  2. params: [collection]

_partial/menu.js

  1. <% site.collection.forEach(coll=>{ %>
  2. <a href="/<%= coll.path %>"><%= coll.name %></a>
  3. <%})%>