Sha256: 5adfc3c704696cf2e968f07ee85b83a894fa1dfd67bc4c732a90900abfe35248
Contents?: true
Size: 1.65 KB
Versions: 6
Compression:
Stored size: 1.65 KB
Contents
{% capture stats_data %} {"calendar":{ "by_day": [ {% assign vdate = "2001-01-01" %} {% assign mdate = "2001-01" %} {% assign ydate = "2001" %} {% assign vcount = 0 %} {% assign mcount = 0 %} {% assign ycount = 0 %} {% assign total = 0 %} {% for post in site.posts %} {% assign cdate = post.date | date: "%Y-%m-%d" %} {% if vdate == cdate %} {% assign vcount = vcount | plus: 1 %} {% else %} {% if vdate != "2001-01-01" %} {"date": "{{ vdate }}", "count": {{ vcount }} }, {% endif %} {% assign vdate = cdate %} {% assign vcount = 1 %} {% endif %} {% assign total = total | plus: 1 %} {% endfor %} {"date": "{{ vdate }}", "count": {{ vcount }} }], "by_month": [ {% for post in site.posts %} {% assign cdate = post.date | date: "%Y-%m" %} {% if mdate == cdate %} {% assign mcount = mcount | plus: 1 %} {% else %} {% if mdate != "2001-01" %} {"date": "{{ mdate }}", "count": {{ mcount }} }, {% endif %} {% assign mdate = cdate %} {% assign mcount = 1 %} {% endif %} {% endfor %} {"date": "{{ mdate }}", "count": {{ mcount }} }], "by_year": [ {% for post in site.posts %} {% assign cdate = post.date | date: "%Y" %} {% if ydate == cdate %} {% assign ycount = ycount | plus: 1 %} {% else %} {% if ydate != "2001" %} {"date": "{{ ydate }}", "count": {{ ycount }} }, {% endif %} {% assign ydate = cdate %} {% assign ycount = 1 %} {% endif %} {% endfor %} {"date": "{{ ydate }}", "count": {{ ycount }} }]}, "total": {{total}} } {% endcapture %}{{ stats_data | strip | strip_newlines}}
Version data entries
6 entries across 6 versions & 1 rubygems