Add Open Graph fallback metadata

This commit is contained in:
2026-06-17 23:25:07 +02:00
parent 1848cc8380
commit 6d86c1e689

View File

@@ -31,6 +31,20 @@
{% if canonical_url %} {% if canonical_url %}
<link rel="canonical" href="{{ canonical_url }}"> <link rel="canonical" href="{{ canonical_url }}">
{% endif %} {% endif %}
{% firstof page.seo_title self.seo_title page.title self.title shop_name as og_title %}
{% firstof page.search_description self.search_description "" as og_description %}
{% block open_graph %}
{% if og_title %}
<meta property="og:title" content="{{ og_title }}">
{% endif %}
{% if og_description %}
<meta property="og:description" content="{{ og_description }}">
{% endif %}
{% if canonical_url %}
<meta property="og:url" content="{{ canonical_url }}">
{% endif %}
<meta property="og:type" content="website">
{% endblock %}
<link rel="stylesheet" type="text/css" href="{% static 'cookie_jar/css/cookie_jar.css' %}"> <link rel="stylesheet" type="text/css" href="{% static 'cookie_jar/css/cookie_jar.css' %}">
{% for header_snippet in cookie_jar.activated_snippet_header_templates %} {% for header_snippet in cookie_jar.activated_snippet_header_templates %}
{% include header_snippet %} {% include header_snippet %}