summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHombreLaser <buran@silosneeded.com>2024-05-07 22:57:27 -0600
committerHombreLaser <buran@silosneeded.com>2024-05-07 22:57:27 -0600
commit31aff186969a6e1da1d5d2f456a146643d4b99b1 (patch)
treef4658ca132713327ab5e3236964cf42b6068b9a1
parentc56290d9961e518f027b6f7efaabac92e1e4c388 (diff)
Improve date rendering
-rw-r--r--_data/en/strings.yml12
-rw-r--r--_data/es/strings.yml12
-rw-r--r--_includes/index.liquid4
-rw-r--r--_layouts/post.liquid6
4 files changed, 33 insertions, 1 deletions
diff --git a/_data/en/strings.yml b/_data/en/strings.yml
index 0fb83f3..b203ba5 100644
--- a/_data/en/strings.yml
+++ b/_data/en/strings.yml
@@ -19,3 +19,15 @@ post:
previous: Previous
errors:
not_found: The page you were looking for couldn't be found
+date:
+ Jan: January
+ Feb: February
+ Mar: March
+ Apr: April
+ May: May
+ Jun: June
+ Aug: August
+ Sep: Septembee
+ Oct: October
+ Nov: November
+ Dec: December
diff --git a/_data/es/strings.yml b/_data/es/strings.yml
index 22bd9a3..6fb8132 100644
--- a/_data/es/strings.yml
+++ b/_data/es/strings.yml
@@ -19,3 +19,15 @@ post:
previous: Anterior
errors:
not_found: No se encontró la página que buscabas
+date:
+ Jan: Enero
+ Feb: Febrero
+ Mar: Marzo
+ Apr: Abril
+ May: Mayo
+ Jun: Junio
+ Aug: Agosto
+ Sep: Septiembre
+ Oct: Octubre
+ Nov: Noviembre
+ Dec: Diciembre
diff --git a/_includes/index.liquid b/_includes/index.liquid
index b172823..fe7567f 100644
--- a/_includes/index.liquid
+++ b/_includes/index.liquid
@@ -6,6 +6,10 @@
{{ post.title }}
</a>
</h1>
+ <h2>
+ {% capture month%}{{ post.date | date: "%b" }}{% endcapture %}
+ {{ site.data[site.active_lang].strings.date[month]}} {{ post.date | date: "%e, %Y" }}
+ </h2>
<span>
{{ post.excerpt }}
</span>
diff --git a/_layouts/post.liquid b/_layouts/post.liquid
index f4c4374..fa459bc 100644
--- a/_layouts/post.liquid
+++ b/_layouts/post.liquid
@@ -8,9 +8,13 @@
<div class="column mb-2 content">
<h1>
<a href="{{ site.baseurl}}{{ page.url }}">
- {{ page.date | date: "%b %-d, %Y" }} - {{ page.title }}
+ {{ page.title }}
</a>
</h1>
+ <h2>
+ {% capture month%}{{ page.date | date: "%b" }}{% endcapture %}
+ {{ site.data[site.active_lang].strings.date[month]}} {{ page.date | date: "%d, %Y" }}
+ </h2>
{{ content }}
</div>
{% include navigation_buttons.liquid %}