Sha256: 3dd325bf76e3ceb626d6acbc8059371bc994e50798636e73d3ed61cc23a11568

Contents?: true

Size: 1.66 KB

Versions: 1

Compression:

Stored size: 1.66 KB

Contents

---
layout: default
---

<br/><br/><br/>
{%- include heatmap.html -%}
 

{% comment %}
generate this page only once。
{% endcomment %}
{% assign ALLJSON = "{" %}

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



{%- for post in postsByYear -%}
    {%- capture kv %}
      "{{ post.name }}":1
      {%- unless forloop.last -%},
      {%- endunless -%}
    {%- endcapture -%}
    {% assign ALLJSON = ALLJSON | append:kv %}


    {% assign itemM = post.items | group_by_exp: "post", "post.date | date: '%m' " %}

    {%- capture  SingleYearJson -%}
    {
        "year":"{{post.name}}",
        {%- for item0 in itemM %}
    "{{item0.name }}":
             [
                {%- for item00 in item0.items -%}
                   {
                    "title":"{{ item00.title | replace: '"', ' '}}",
                     "url":"{{ item00.url | relative_url}}",
                     "date": "{{ item00.date | date:"%Y-%m-%d"}}"
                   }{%- unless forloop.last -%},{%- endunless -%}
                 {%- endfor -%}
             ]   
             {%- unless forloop.last -%},{%- endunless -%}
        {%- endfor -%}
    }
    {%- endcapture -%}

    {%- capture  FILENAME -%}
    assets/dyn/{{post.name}}.json
    {%- endcapture -%}

    {{ SingleYearJson | write_file: FILENAME }}
{%- endfor -%}

{% assign ALLJSON = ALLJSON | append: " }" %}
{{ ALLJSON | write_file: "assets/dyn/allyear.json" }}



 <br>

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

 
 {% for year in posts_by_year %}
    {{ year.name }}
   {% include heatmap.html endYear=year.name title=year.name %}
  
 {% endfor %}


 {{ content }}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
no-style-please2-0.9.3 _layouts/heatmap.html