Edit metadata

This commit is contained in:
Paul Nicoué 2022-09-29 16:55:44 +02:00
parent 177e28538f
commit 9d7446df77

View file

@ -6,8 +6,13 @@
<style itemscope itemtype="https://schema.org/WebSite" itemref="schema_name schema_description schema_image"></style> <style itemscope itemtype="https://schema.org/WebSite" itemref="schema_name schema_description schema_image"></style>
{# Title #} {# Title #}
<title>{{ site.title }} | {{ page.title }}</title> {% if page.isHomePage %}
<meta id="schema_name" itemprop="name" content="{{ site.title }} | {{ page.title }}"> <title>{{ site.title }}</title>
<meta id="schema_name" itemprop="name" content="{{ site.title }}">
{% else %}
<title>{{ site.title }} | {{ page.title }}</title>
<meta id="schema_name" itemprop="name" content="{{ site.title }} | {{ page.title }}">
{% endif %}
{# Description #} {# Description #}
{% if page.meta_description is not empty %} {% if page.meta_description is not empty %}
@ -37,7 +42,11 @@
{% if page.template != 'error' %} {% if page.template != 'error' %}
{# Open Graph #} {# Open Graph #}
{% if page.isHomePage %}
<meta property="og:title" content="{{ site.title }}">
{% else %}
<meta property="og:title" content="{{ site.title ~ ' | ' ~ page.title }}"> <meta property="og:title" content="{{ site.title ~ ' | ' ~ page.title }}">
{% endif %}
{% if page.meta_description is not empty %} {% if page.meta_description is not empty %}
<meta property="og:description" content="{{ page.meta_description }}"> <meta property="og:description" content="{{ page.meta_description }}">
{% elseif site.homePage.meta_description is not empty %} {% elseif site.homePage.meta_description is not empty %}
@ -57,7 +66,11 @@
{# Twitter Card #} {# Twitter Card #}
<meta name="twitter:card" content="{{ page.twitter_card_type.value }}"> <meta name="twitter:card" content="{{ page.twitter_card_type.value }}">
{% if page.isHomePage %}
<meta name="twitter:title" content="{{ site.title }}">
{% else %}
<meta name="twitter:title" content="{{ site.title ~ ' | ' ~ page.title }}"> <meta name="twitter:title" content="{{ site.title ~ ' | ' ~ page.title }}">
{% endif %}
{% if page.meta_description is not empty %} {% if page.meta_description is not empty %}
<meta name="twitter:description" content="{{ page.meta_description }}"> <meta name="twitter:description" content="{{ page.meta_description }}">
{% elseif site.homePage.meta_description is not empty %} {% elseif site.homePage.meta_description is not empty %}