<%#
this page will judge whether current page is 'tag.'
url:'http://localhost:4000/tag/' return false.
url:'http://localhost:4000/tags/test/' return true.
if you enter 'tag' page by click link will show all tags.
otherwise if you enter 'tags' by click post header link will show the single tag of this post.
how to add a tag page:
    1. hexo new page "tag"
    2. cd source/tag/index.md
    3. add layout pattern like this:
    ---
    title: '''tag'''
    date: 2019-06-09 09:56:49
    layout: tag
    ---
 %>
<% if(is_tag()){ %>
  <%- partial('archive', {pagination: config.tag, index: true}) %>
<% } else { %>
  <div class="px-6 max-w-prose mx-auto md:px-0 mt-6">
    <h2 class="font-bold text-2xl">Tags</h2>
    <ul class="mt2">
      <% site.tags.forEach(item => { %>
        <li class="mt-2">
          <a href="<%-url_for(item.path)%>"><%- item.name%></a>
          <span >(<%-item.length%>)</span>
        </li>
      <% }) %>
    </ul>
  </div>
<% } %>
