From 26f386d2d66779a25f91dc688ce44ff768ac1cf9 Mon Sep 17 00:00:00 2001 From: Jieiku <106644+Jieiku@users.noreply.github.com> Date: Thu, 19 Sep 2024 23:53:06 -0700 Subject: [PATCH] set og:locale according to Language --- templates/macros/seo.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/macros/seo.html b/templates/macros/seo.html index 8d2ada13..d8853be4 100644 --- a/templates/macros/seo.html +++ b/templates/macros/seo.html @@ -5,6 +5,11 @@ {%- macro seo( config, title="", title_addition="", description="", type="website", is_home=false, is_404=false, is_page=false, page_images="", page_section="", created_time="2023-05-15T07:07:00-07:00", updated_time="2023-05-15T07:07:00-07:00" ) %} +{#- Load current language i18n data from .toml files in user's '/i18n' folder, use theme as fallback. #} +{%- set i18n = load_data(path="i18n/" ~ lang ~ '.toml', required=false) -%} +{%- if not i18n -%}{%- set i18n = load_data(path="themes/abridge/i18n/" ~ lang ~ ".toml", required=false) -%}{%- endif %} +{%- set lang_locale = macros::translate(key='date_locale', default='en_US', i18n=i18n) -%} + {%- if is_404 -%} {%- else -%} @@ -117,7 +122,7 @@ {#- SEO MEDIA END #} - + {%- if page.updated %}