<title>{% if page_title is defined %}{{ page_title | striptags }} - {% endif %}{{ project.configuration.title | localize }}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="Betty (https://betty.readthedocs.io)">
{% if project.configuration.author %}
    <meta name="author" content="{{ project.configuration.author | localize }}">
{% endif %}
<meta name="og:title" content="{{ page_title | default(project.configuration.title | localize) | striptags }}">
<meta name="og:site_name" content="{{ project.configuration.title | localize }}">
<meta name="twitter:title" content="{{ page_title | default(project.configuration.title | localize) | striptags }}">
<meta name="twitter:card" content="summary_large_image">
{% if page_resource is defined %}
    {% if page_resource is has_file_references %}
        {% set page_image_reference = page_resource.file_references | selectattr('file', 'public') | selectattr('file.media_type.type', 'eq', 'image') | first %}
        {% if page_image_reference is defined %}
            {% set page_image = page_image_reference.file %}
            {% set page_image_url = page_image_reference | image_resize_cover((500, 500)) | static_url(absolute=true) %}
            <meta name="og:image" content="{{ page_image_url }}">
            <meta name="og:image:type" content="{{ page_image.media_type }}">
            <meta name="twitter:image" content="{{ page_image_url }}">
            {% if page_image.description %}
                <meta name="og:image:description" content="{{ page_image.description | localize }}">
                <meta name="twitter:image:alt" content="{{ page_image.description | localize }}">
            {% endif %}
        {% endif %}
    {% endif %}
    <link rel="canonical" href="{{ page_resource | localized_url(absolute=true) }}" hreflang="{{ localizer.locale }}" type="text/html">
    {% for locale in project.configuration.locales %}
        {% if locale != localizer.locale %}
            <link rel="alternate" href="{{ page_resource | localized_url(locale=locale) }}" hreflang="{{ locale }}" type="text/html">

        {% endif %}
    {% endfor %}
    {% if page_resource is linked_data_dumpable %}
        <script type="application/ld+json">
          {{ page_resource.dump_linked_data(project) | tojson }}
        </script>
    {% endif %}
    {% if page_resource is entity_plugin and page_resource is persistent_entity_id %}
        <link rel="alternate" href="{{ page_resource | localized_url(media_type='application/json') }}" hreflang="und" type="application/json">
    {% endif %}
{% endif %}
{% set icon_url = '/logo.png' | static_url %}
<link rel="icon" href="{{ icon_url }}">
<link rel="apple-touch-icon" href="{{ icon_url }}">
