-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy paththis-month.html
37 lines (33 loc) · 1.23 KB
/
this-month.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
layout: page
title: 'This Month'
subtitle: Published posts
description: "All the blog posts written this month by Cesar Soto Valero"
---
{% assign current_month_name = 'now' | date: "%B" %}
{% assign current_year = 'now' | date: "%Y" %}
{% assign current_month = 'now' | date: "%m" %}
{% assign date_format = site.date_format | default: "%B %-d, %Y" %}
<div id="full-tags-list">
<h3 id="{{- current_year -}}" class="linked-section">
<i class="fas fa-calendar-alt" aria-hidden="true"></i>
{{ current_month_name }}, {{- current_year -}}
</h3>
<div class="post-list">
{%- for post in site.posts -%}
{%- assign post_year = post.date | date: "%Y" -%}
{%- assign post_month = post.date | date: "%m" -%}
{%- if post_year == current_year and post_month == current_month -%}
<div class="tag-entry">
<a href="{{ post.url | relative_url }}">{{- post.title -}}</a>
<div class="entry-date">
<time datetime="{{- post.date | date_to_xmlschema -}}">{{- post.date | date: date_format -}}</time>
</div>
<div class="entry-description">
{{ post.description }}
</div>
</div>
{%- endif -%}
{%- endfor -%}
</div>
</div>