{%- 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="
", to=" ") | replace(from=" ", to=" ") | replace(from=" ", to=" ") | replace(from=" ", to=" ") | truncate(length=160) %} {% endif -%} {%- if description -%} {% endif -%} {%- endblock -%} {% block rss -%} {% endblock -%} {%- set preview_image = 'images/screenshots/prague.jpg' -%} {%- if resource.extra.preview_image -%} {%- set preview_image = resource.extra.preview_image -%} {%- elif resource.assets %} {%- set basename = resource.assets[0] | split(pat='/') | last %} {%- if basename is ending_with('.jpg') or basename is ending_with('.jpeg') or basename is ending_with('.png') or basename is ending_with('.webp') %} {%- set preview_image = resource_path ~ basename -%} {%- endif %} {%- endif %} {# TODO: Add og:video support #} {%- if description %} {%- endif -%} {%- if description %} {%- endif %} {% if resource.date -%} {%- endif -%} {%- block meta -%}{%- endblock %} {{ resource_title }} {%- if lang == config.default_language %} {% include 'language_redirect.html' %} {% endif -%}
{% include 'top_menu.html' %}
{% if page.taxonomies and page.taxonomies.faq %}{# Show FAQ breadcrumbs #} {% include 'faq/faq-breadcrumbs.html' %} {% endif %} {% block content %}{% endblock %}