mirror of
https://github.com/welpo/tabi.git
synced 2025-10-10 23:38:53 +02:00
implementation
This commit is contained in:
parent
2064beae78
commit
eedf8231fa
1 changed files with 17 additions and 1 deletions
|
@ -7,6 +7,18 @@
|
||||||
{# Set locale for date #}
|
{# Set locale for date #}
|
||||||
{% set date_locale = macros_translate::translate(key="date_locale", default="en_GB", language_strings=language_strings) %}
|
{% set date_locale = macros_translate::translate(key="date_locale", default="en_GB", language_strings=language_strings) %}
|
||||||
|
|
||||||
|
{#- Check for language-specific date formats -#}
|
||||||
|
{%- set language_format = "" -%}
|
||||||
|
{%- if config.extra.date_formats -%}
|
||||||
|
{%- for format_config in config.extra.date_formats -%}
|
||||||
|
{%- if format_config.lang == lang -%}
|
||||||
|
{%- if format_config.archive -%}
|
||||||
|
{%- set_global language_format = format_config.archive -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- endif -%}
|
||||||
|
|
||||||
<div class="archive">
|
<div class="archive">
|
||||||
<ul class="list-with-title">
|
<ul class="list-with-title">
|
||||||
{%- set source_paths = section.extra.section_path | default(value="blog/") -%}
|
{%- set source_paths = section.extra.section_path | default(value="blog/") -%}
|
||||||
|
@ -55,7 +67,11 @@
|
||||||
<li class="listing-item">
|
<li class="listing-item">
|
||||||
<div class="post-time">
|
<div class="post-time">
|
||||||
<span class="date">
|
<span class="date">
|
||||||
{{ post.date | date(format="%d %b", locale=date_locale) }}
|
{%- if language_format -%}
|
||||||
|
{{ post.date | date(format=language_format, locale=date_locale) }}
|
||||||
|
{%- else -%}
|
||||||
|
{{ post.date | date(format="%d %b", locale=date_locale) }}
|
||||||
|
{%- endif -%}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a href="{{ post.permalink }}" title="{{ post.title }}">{{ post.title | markdown(inline=true) | safe }}</a>
|
<a href="{{ post.permalink }}" title="{{ post.title }}">{{ post.title | markdown(inline=true) | safe }}</a>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue