{%- if page %} {%- set resource = page %} {%- set resource_title = resource.title %} {%- set resource_path = resource.path %} {%- elif section %} {%- set resource = section %} {%- set resource_title = resource.title %} {%- set resource_path = resource.path %} {%- elif term %} {%- set resource = term %}{# taxonomy term has only 'name', 'slug' and 'path' properties #} {%- set resource_path = resource.path %} {%- set resource_title = resource.name %} {%- elif taxonomy %}{# taxonomy has only 'name' and 'slug' properties #} {% if lang == 'en' %} {% set resource = taxonomy.name ~ "/_index.md" %} {% else %} {% set resource = taxonomy.name ~ "/_index." ~ lang ~ ".md" %} {% endif %} {% set resource = get_section(path=resource) %} {%- set resource_title = resource.title %} {%- set resource_path = resource.path %} {%- endif %} {%- set rtl_langs = ["ar", "arc", "dv", "fa", "ha", "he", "khw", "ks", "ku", "ps", "ur", "yi"] -%}
{% block meta_description -%} {%- if resource.description -%} {% set description = resource.description %} {% elif resource.content -%} {% set description = resource.content | trim | striptags | linebreaksbr | safe | replace(from="