hexo-additional-helper
v1.0.1
Published
A hexo plugin to provide addtional helpers
Downloads
13
Readme
new helpers:
1. ah_list_archives
ah_list_archives based on implementation of list_archives, support one more option:callback, which will take over constructing content of each archive item. example(using bootstrap4):
```
<%- ah_list_archives({show_count: theme.show_count, type: theme.archive_type, callback:function(name,url,cnt)
{
let result='<a href="';
result += url;
result +='" class="list-group-item">';
result += name;
result += ' <span class="badge badge-primary">';
result += cnt;
result += '</span></a>';
return result;
}}) %>
```
2. ah_list_posts
list posts of specified tag
callback function with three parameters:title, url, content
example:
<%- ah_list_posts({tagname:'hexo',callback:function(title,url,content){return '<p>'+title+url+'</p>';}}) %>
powered by JM Zhang