From 31aff186969a6e1da1d5d2f456a146643d4b99b1 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Tue, 7 May 2024 22:57:27 -0600 Subject: Improve date rendering --- _data/en/strings.yml | 12 ++++++++++++ _data/es/strings.yml | 12 ++++++++++++ _includes/index.liquid | 4 ++++ _layouts/post.liquid | 6 +++++- 4 files changed, 33 insertions(+), 1 deletion(-) 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 }} +

+ {% capture month%}{{ post.date | date: "%b" }}{% endcapture %} + {{ site.data[site.active_lang].strings.date[month]}} {{ post.date | date: "%e, %Y" }} +

{{ post.excerpt }} 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 @@

- {{ page.date | date: "%b %-d, %Y" }} - {{ page.title }} + {{ page.title }}

+

+ {% capture month%}{{ page.date | date: "%b" }}{% endcapture %} + {{ site.data[site.active_lang].strings.date[month]}} {{ page.date | date: "%d, %Y" }} +

{{ content }}
{% include navigation_buttons.liquid %} -- cgit v1.2.3