GitBucket
Snippets
Sign in
leon
/
archives.txt
Fork
0
Created at Sat Oct 10 14:40:17 WIB 2020
Download ZIP
HTTP
Embed
Embed this snippet in your website.
HTTP
Clone with Git using the repository's web address.
Code
Revision
Forks
Leonardus Kristaris Sastra
revised this
on 10 Oct 2020
68b41d3
archives.md
--- title: Archives type: archives # The Archives of posts. # v2.0 # https://github.com/cotes2020/jekyll-theme-chirpy # © 2017-2019 Cotes Chung # MIT License --- <div id="archives" class="pl-xl-2"> {% for post in site.posts %} {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} {% capture pre_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %} {% if forloop.first %} {% assign last_day = "" %} {% assign last_month = "" %} <span class="lead">{{this_year}}</span> <ul class="list-unstyled"> {% endif %} <li> <div> {% capture this_day %}{{ post.date | date: "%d" }}{% endcapture %} {% capture this_month %}{{ post.date | date: "%b" }}{% endcapture %} <span class="date day">{{ this_day }}</span> <span class="date month small text-muted">{{ this_month }}</span> <a href="{{ post.url | relative_url }}">{{ post.title }}</a> </div> </li> {% if forloop.last %} </ul> {% elsif this_year != pre_year %} </ul> <span class="lead">{{pre_year}}</span> <ul class="list-unstyled"> {% assign last_day = "" %} {% assign last_month = "" %} {% endif %} {% endfor %} </div>y
archives.txt
--- title: Archives type: archives # The Archives of posts. # v2.0 # https://github.com/cotes2020/jekyll-theme-chirpy # © 2017-2019 Cotes Chung # MIT License --- <div id="archives" class="pl-xl-2"> {% for post in site.posts %} {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} {% capture pre_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %} {% if forloop.first %} {% assign last_day = "" %} {% assign last_month = "" %} <span class="lead">{{this_year}}</span> <ul class="list-unstyled"> {% endif %} <li> <div> {% capture this_day %}{{ post.date | date: "%d" }}{% endcapture %} {% capture this_month %}{{ post.date | date: "%b" }}{% endcapture %} <span class="date day">{{ this_day }}</span> <span class="date month small text-muted">{{ this_month }}</span> <a href="{{ post.url | relative_url }}">{{ post.title }}</a> </div> </li> {% if forloop.last %} </ul> {% elsif this_year != pre_year %} </ul> <span class="lead">{{pre_year}}</span> <ul class="list-unstyled"> {% assign last_day = "" %} {% assign last_month = "" %} {% endif %} {% endfor %} </div>y
Leonardus Kristaris Sastra
revised this
on 10 Oct 2020
9a3c500
archives.md
--- title: Archives type: archives # The Archives of posts. # v2.0 # https://github.com/cotes2020/jekyll-theme-chirpy # © 2017-2019 Cotes Chung # MIT License --- <div id="archives" class="pl-xl-2"> {% for post in site.posts %} {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} {% capture pre_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %} {% if forloop.first %} {% assign last_day = "" %} {% assign last_month = "" %} <span class="lead">{{this_year}}</span> <ul class="list-unstyled"> {% endif %} <li> <div> {% capture this_day %}{{ post.date | date: "%d" }}{% endcapture %} {% capture this_month %}{{ post.date | date: "%b" }}{% endcapture %} <span class="date day">{{ this_day }}</span> <span class="date month small text-muted">{{ this_month }}</span> <a href="{{ post.url | relative_url }}">{{ post.title }}</a> </div> </li> {% if forloop.last %} </ul> {% elsif this_year != pre_year %} </ul> <span class="lead">{{pre_year}}</span> <ul class="list-unstyled"> {% assign last_day = "" %} {% assign last_month = "" %} {% endif %} {% endfor %} </div>y