{%- for date_item in unique_dates -%}
{%- assign sorted_roadmap_by_date = sorted_roadmap | where_exp: "roadmap", "roadmap.date == date_item" -%}
{%- assign newyear = date_item | date: "%Y" -%}
{%- capture thismonth -%}{{ 'now' | date: '%m'}}{%- endcapture -%}
{%- capture thisyear -%}{{ 'now' | date: '%Y'}}{%- endcapture -%}
{%- capture roadmap_item_month -%}{{ date_item | date: '%m'}}{%- endcapture -%}
{%- capture roadmap_item_year -%}{{ date_item | date: '%Y'}}{%- endcapture -%}
{%- assign years_since = thisyear | minus: roadmap_item_year -%}
{%- assign months_since = years_since | times: 12 | plus: thismonth | minus: roadmap_item_month -%}
{%- comment -%}
Show the last three complete months
{%- endcomment -%}
{%- if months_since > 3 -%}
{%- assign hidden_class = "hidden expand" -%}
{%- else -%}
{%- assign hidden_class = "" -%}
{%- endif -%}
{%- if newyear != year -%}
{%- assign year = newyear -%}
{{ newyear }}
{%- endif -%}
{% assign roadmap_month = date_item | date: "%B" %}
{%- if month != roadmap_month -%}
{{ date_item | date: "%B %Y" }}
{%- else -%}
{%- endif -%}
{% assign month = roadmap_month %}
{%- for roadmap_item in sorted_roadmap_by_date -%}
{%- assign service_short = roadmap_item.service | capitalize -%}
{%- for service_name in service_names -%}
{%- if service_name contains service_short -%}
{{ service_name }}
{%- endif -%}
{%- endfor -%}
{{ roadmap_item.content | markdownify }}
{%- endfor -%}
{%- endfor -%}