---
layout: default
title : Blog
navbar_title: Blog
body_attr: >-
  data-spy="scroll" data-target="#navbar-year" data-offset="100"
---

{% assign blogs_by_year = site.posts | sort: "date" | reverse | group_by_exp: "item", "item.date | date: '%Y'" %}

<div class="row">
    <div class="col-12 col-lg-10">
        {% for year in blogs_by_year %}
        {% assign num_blogs = year.items | size %}
        <h2 class="pt-4" id="year-{{ year.name }}">{{ year.name }}</h2>
        <div class="my-0 p-0 bg-white shadow-sm rounded-xl">
            {% for item in year.items %}
                {% include widgets/blog_card.html item=item hide_bottom_border=forloop.last first=forloop.first last=forloop.last %}
            {% endfor %}
        </div>
        {% endfor %}
    </div>

    <div class="col-2 d-none d-lg-block">
        <div id="navbar-year" class="nav nav-pills flex-column sticky-top" style="top: 80px">
            {% for year in blogs_by_year %}
            <a class="nav-link d-block" href="#year-{{ year.name }}">{{ year.name }}</a>
            {% endfor %}
        </div>
    </div>

</div>
