hexo-additional-helper

A hexo plugin to provide addtional helpers

Usage no npm install needed!

<script type="module">
  import hexoAdditionalHelper from 'https://cdn.skypack.dev/hexo-additional-helper';
</script>

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](http://www.sumoon.com)**