Add opengraph
This commit is contained in:
@@ -5,12 +5,36 @@
|
|||||||
{% set zolaVer = '0.13.0' %}
|
{% set zolaVer = '0.13.0' %}
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta name="generator" content="Zola v.{{ zolaVer }} - getzola.org" />
|
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% if current_path == '/' %}
|
{% if current_path == '/' %}
|
||||||
<title>{{ config.title }}</title>
|
<title>{{ config.title }}</title>
|
||||||
<meta property="og:title" content="{{ config.title }}" />
|
<meta property="og:type" content="website" />
|
||||||
|
<meta property="og:site_name" content="{{ config.base_url }}" />
|
||||||
|
{%if section.title%}
|
||||||
|
<title>{{ section.title }}</title>
|
||||||
|
<meta name="og:title" content="{{ section.title }}" />
|
||||||
|
{%endif%}
|
||||||
|
{%if page.title%}
|
||||||
|
<title>{{ page.title }}</title>
|
||||||
|
<meta name="og:title" content="{{ page.title }}" />
|
||||||
|
{%endif%}
|
||||||
|
{%if section.extra.imgPath %}
|
||||||
|
<meta name="image" content="{{ section.extra.imgPath }}" />
|
||||||
|
<meta name="og:image" content="{{ section.extra.imgPath }}" />
|
||||||
|
{%endif%}
|
||||||
|
{%if page.extra.imgPath%}
|
||||||
|
<meta name="image" content="{{ page.extra.imgPath }}" />
|
||||||
|
<meta name="og:image" content="{{ page.extra.imgPath }}" />
|
||||||
|
{%endif%}
|
||||||
|
{%if section.description%}
|
||||||
|
<meta name="description" content="{{ section.description }}" />
|
||||||
|
<meta name="og:description" content="{{ section.description }}" />
|
||||||
|
{%endif%}
|
||||||
|
{%if page.description%}
|
||||||
|
<meta name="description" content="{{ page.description }}" />
|
||||||
|
<meta name="og:description" content="{{ page.description }}" />
|
||||||
|
{%endif%}
|
||||||
{% else %}
|
{% else %}
|
||||||
<title>{% if section.title %}{{ section.title }} • {% endif %}{% if page.title %}{{ page.title }} • {% endif %}{{ config.title }}</title>
|
<title>{% if section.title %}{{ section.title }} • {% endif %}{% if page.title %}{{ page.title }} • {% endif %}{{ config.title }}</title>
|
||||||
<meta property="og:title" content="{% if section.title %}{{ section.title }} • {% endif %}{% if page.title %}{{ page.title }} • {% endif %}{{ config.title }}" />
|
<meta property="og:title" content="{% if section.title %}{{ section.title }} • {% endif %}{% if page.title %}{{ page.title }} • {% endif %}{{ config.title }}" />
|
||||||
|
|||||||
Reference in New Issue
Block a user