Sha256: 9a44d170c3d225ac0deb5940e7a720f91b7ea5179090f7ec605f926ff01e9389

Contents?: true

Size: 1.24 KB

Versions: 6

Compression:

Stored size: 1.24 KB

Contents

---
layout: page
---

{{ content }}

{%- assign taxonomies = site.posts | group_by_exp: "post", "post.date | date: '%Y'" -%}

<div class="taxonomies-wrapper">
  <ul class="taxonomies">
    {%- for taxonomy in taxonomies -%}
      <li>
        {%- capture link -%}{{ page.permalink }}#{{ taxonomy.name }}{%- endcapture -%}
        <a class="taxonomy" href="{{ link | relative_url }}">
            <span>{{ taxonomy.name }}</span>
            <span class="taxonomy-count">{{ taxonomy.size }}</span>
        </a> 
      </li>
    {%- endfor -%}
  </ul>
</div>

{% comment %} Show posts by taxonomy {% endcomment %}
{%- for taxonomy in taxonomies -%}
  <h2 id="{{ taxonomy.name }}">
    {{ taxonomy.name }}
  </h2>
  <ul class="post-list-by-taxonomy">
    {%- assign posts = taxonomy.items -%}
    {%- for post in posts -%}
      <li>
        <time datetime="{{ page.date | date_to_xmlschema }}">{{ post.date | date: "%Y-%m-%d" }}</time> &raquo; <a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
      </li>
    {%- endfor -%}
  </ul>
  <a href="#" onclick="backToTop()" class="back-to-top">Top &#8648;</a>
{%- endfor -%}

<script>
  function backToTop() {
    const main = document.getElementById("site-main");
    main.scrollTop = 0;
  }
</script>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
jekyll-theme-hamilton-4.0.0 _layouts/archive-years.html
jekyll-theme-hamilton-3.1.0 _layouts/archive-years.html
jekyll-theme-hamilton-3.0.0 _layouts/archive-years.html
jekyll-theme-hamilton-2.0.0 _layouts/archive-years.html
jekyll-theme-hamilton-1.4.4 _layouts/archive-years.html
jekyll-theme-hamilton-1.4.3 _layouts/archive-years.html