From 1effd80bb93268ebce47ecad307c435f05b12a5c Mon Sep 17 00:00:00 2001 From: Quincy Morgan <2046746+quincylvania@users.noreply.github.com> Date: Wed, 24 Apr 2024 14:51:39 -0400 Subject: [PATCH] Support custom date format in item list --- _includes/item_list.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/_includes/item_list.html b/_includes/item_list.html index eee952b..5e43373 100644 --- a/_includes/item_list.html +++ b/_includes/item_list.html @@ -11,6 +11,8 @@ {%- assign show_image=false -%} {%- endif -%} +{%- assign date_format = include.date_format | default: site.date_format | default: "%b %e, %Y" -%} +
{%- for item in _items -%} {%- assign names=item.author | default: item.speaker -%} @@ -30,7 +32,7 @@

{{title}} {% if item.youtube or item.podbean or item.video_src %}{% endif %} - {{item.date | date: site.date_format }} + {{item.date | date: date_format }} {%-if names and names.size > 0 %} ·| {% if include.ignore_name %} @@ -39,7 +41,7 @@ {%- include names_list.html names=names avatar=false -%} {%- endif -%}

-

{{item.date | date: site.date_format }}

+

{{item.date | date: date_format }}

{% else %}
@@ -81,10 +83,10 @@

{{title}}

{%- endif -%} {%- if include.subtitles -%}

{{include.subtitles | slice: forloop.index0 }}

- {%- elsif item.collection=='posts' -%} + {%- elsif item.collection=='posts' or include.date_format -%} {%- unless include.gallery -%}

- {{item.date | date: site.date_format }} + {{item.date | date: date_format }} {% if names %} · {% include names_list.html names=names %}