diff options
| -rw-r--r-- | config.toml | 5 | ||||
| -rw-r--r-- | content/overview-abridge.fr.md | 1 | ||||
| -rw-r--r-- | content/overview-abridge.md | 1 | ||||
| -rw-r--r-- | templates/macros/macros.html | 37 |
4 files changed, 38 insertions, 6 deletions
diff --git a/config.toml b/config.toml index 3d5addf..ebeba67 100644 --- a/config.toml +++ b/config.toml @@ -41,6 +41,7 @@ flag = "🇫🇷" date_locale = "fr_FR" Search = "Recherche" Recent_Posts = "Articles Récents" +Updated = "Modifié" Index = "Indice" Powered_by = "Propulsé" and = "et" @@ -117,8 +118,8 @@ menu_footer = [ recent = true # TOC / index recent_items = 9 -meta_index = { position="bottom", size="s90", author=false, readtime=false, readstring="min", date=true, categories_tags=true, divider=" " } -meta_post = { position="top", size="s95", author=true, readtime=false, readstring="min read", date=true, categories_tags=true, divider=" " } +meta_index = { position="bottom", size="s90", author=false, readtime=false, readstring="min", date=true, updated=false, categories_tags=true, divider=" " } +meta_post = { position="top", size="s95", author=true, readtime=false, readstring="min read", date=true, updated=true, categories_tags=true, divider=" " } hide_section_dates = false # hides the date for sections that use posts.html as their template. hide_page_nextprev_titles = false # hides the next/previous titles for pages that use page.html as their template. diff --git a/content/overview-abridge.fr.md b/content/overview-abridge.fr.md index 1fda697..388ff69 100644 --- a/content/overview-abridge.fr.md +++ b/content/overview-abridge.fr.md @@ -1,6 +1,7 @@ +++ title = "Abridge Zola Thème" date = 2022-05-17 +updated = 2023-07-21 draft = false [taxonomies] diff --git a/content/overview-abridge.md b/content/overview-abridge.md index f68ef2f..e3f0b58 100644 --- a/content/overview-abridge.md +++ b/content/overview-abridge.md @@ -1,6 +1,7 @@ +++ title = "Abridge Zola Theme" date = 2022-05-17 +updated = 2023-07-21 draft = false [taxonomies] diff --git a/templates/macros/macros.html b/templates/macros/macros.html index 4c86aac..f994bdb 100644 --- a/templates/macros/macros.html +++ b/templates/macros/macros.html @@ -24,7 +24,7 @@ {#- divider #} {%- if config.extra.meta_post.author %} - {%- if config.extra.meta_post.readtime or config.extra.meta_post.date or config.extra.meta_post.categories_tags %} + {%- if config.extra.meta_post.readtime or config.extra.meta_post.date or config.extra.meta_post.updated or config.extra.meta_post.categories_tags %} {%- if config.extra.meta_post.divider %}<span class="hpad">{{ config.extra.meta_post.divider | safe }}</span>{%- else %} {%- endif %} {%- endif %} {%- endif %} @@ -32,7 +32,7 @@ {#- ReadTime #} {%- if config.extra.meta_post.readtime %} {%- if config.extra.icon_read %}<i class="{{ config.extra.icon_read }}"></i> {% endif %} {{ page.reading_time }} {{ config.extra.meta_post.readstring | default(value="min") }} {#- divider #} - {%- if config.extra.meta_post.date or config.extra.meta_post.categories_tags %} + {%- if config.extra.meta_post.date or config.extra.meta_post.updated or config.extra.meta_post.categories_tags %} {%- if config.extra.meta_post.divider %}<span class="hpad">{{ config.extra.meta_post.divider | safe }}</span>{%- else %} {%- endif %}{%- endif %}{%- endif %} {#- Date #} @@ -46,6 +46,20 @@ {{ page.date | date(format="%B %d, %Y", locale=lang_locale) }} {%- else %} {{ page.date | date(format="%B %d, %Y") }} {%- endif %} {#- divider #} + {%- if config.extra.meta_post.updated or config.extra.meta_post.categories_tags %} + {%- if config.extra.meta_post.divider %}<span class="hpad">{{ config.extra.meta_post.divider | safe }}</span>{%- else %} {%- endif %}{%- endif %}{% endif %} + + {#- Updated #} + {%- if config.extra.meta_post.updated and page.updated %} {%- if config.extra.icon_date %}<i class="{{ config.extra.icon_date }}"></i> {% endif -%} + {%- if lang != config.default_language %} {{ trans(key="Updated" | safe, lang=lang) }}{% else %} Updated{% endif %}: + {%- if config.extra.date_locale %} + {%- if lang != config.default_language -%} + {%- set lang_locale = trans(key="date_locale" | safe, lang=lang) -%} + {%- else -%} + {%- set lang_locale = config.extra.date_locale -%} + {%- endif %} {{ page.updated | date(format="%B %d, %Y", locale=lang_locale) }} + {%- else %} {{ page.updated | date(format="%B %d, %Y") }} {%- endif %} + {#- divider #} {%- if config.extra.meta_post.categories_tags %} {%- if config.extra.meta_post.divider %}<span class="hpad">{{ config.extra.meta_post.divider | safe }}</span>{%- else %} {%- endif %}{%- endif %}{% endif %} @@ -83,7 +97,7 @@ {#- divider #} {%- if config.extra.meta_index.author %} - {%- if config.extra.meta_index.readtime or config.extra.meta_index.date or config.extra.meta_index.categories_tags %} + {%- if config.extra.meta_index.readtime or config.extra.meta_index.date or config.extra.meta_index.updated or config.extra.meta_index.categories_tags %} {%- if config.extra.meta_index.divider %}<span class="hpad">{{ config.extra.meta_index.divider | safe }}</span>{%- else %} {%- endif %} {%- endif %} {%- endif %} @@ -91,7 +105,7 @@ {#- ReadTime #} {%- if config.extra.meta_index.readtime %} {%- if config.extra.icon_read %}<i class="{{ config.extra.icon_read }}"></i> {% endif %} {{ page.reading_time }} {{ config.extra.meta_index.readstring | default(value="min") }} {#- divider #} - {%- if config.extra.meta_index.date or config.extra.meta_index.categories_tags %} + {%- if config.extra.meta_index.date or config.extra.meta_index.updated or config.extra.meta_index.categories_tags %} {%- if config.extra.meta_index.divider %}<span class="hpad">{{ config.extra.meta_index.divider | safe }}</span>{%- else %} {%- endif %}{%- endif %}{%- endif %} {#- Date #} @@ -105,6 +119,21 @@ {{ page.date | date(format="%B %d, %Y", locale=lang_locale) }} {%- else %} {{ page.date | date(format="%B %d, %Y") }} {%- endif %} {#- divider #} + {%- if config.extra.meta_index.updated or config.extra.meta_index.categories_tags %} + {%- if config.extra.meta_index.divider %}<span class="hpad">{{ config.extra.meta_index.divider | safe }}</span>{%- else %} {%- endif %}{%- endif %}{% endif %} + + {#- Updated #} + {%- if config.extra.meta_index.updated and page.updated %} {%- if config.extra.icon_date %}<i class="{{ config.extra.icon_date }}"></i> {% endif -%} + {%- if lang != config.default_language %} {{ trans(key="Updated" | safe, lang=lang) }}{% else %} Updated{% endif %}: + {%- if config.extra.date_locale %} + {%- if lang != config.default_language -%} + {%- set lang_locale = trans(key="date_locale" | safe, lang=lang) -%} + {%- else -%} + {%- set lang_locale = config.extra.date_locale -%} + {%- endif %} {{ page.updated | date(format="%B %d, %Y", locale=lang_locale) }} + {%- else %} {{ page.updated | date(format="%B %d, %Y") }} {%- endif %} + + {#- divider #} {%- if config.extra.meta_index.categories_tags %} {%- if config.extra.meta_index.divider %}<span class="hpad">{{ config.extra.meta_index.divider | safe }}</span>{%- else %} {%- endif %}{%- endif %}{% endif %} |
