Skip to content

ktalo/hexo-list-related-posts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hexo-list-related-posts

A hexo plugin that generates a list of links to related posts based on tags.

List is ordered by the number of matched tags.

Install

$ npm install hexo-list-related-posts --save

Usage

Add <%- list_related_posts([options]) %> in template file for article.

Options

option description default
maxCount Maximum count of a list 5
ulClass Class name of ul 'related-posts'
liClass Class name of li 'related-posts-item'
orderBy 'date' or 'random'
When the number of matched tags is the same, list is ordered by date or random.
'date'
isAscending Ascending or descending when list is ordered by date. false

Examples

<%- list_related_posts({maxCount: 10, orderBy: 'random'}) %>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%