Add Open Graph and Twitter meta tags
This commit is contained in:
parent
bb4200505e
commit
f8d3a60e50
3 changed files with 31 additions and 0 deletions
|
|
@ -5,6 +5,19 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>{% block title %}{{ config.title }}{% endblock title %}</title>
|
<title>{% block title %}{{ config.title }}{% endblock title %}</title>
|
||||||
<meta name="description" content="{% block description %}{{ config.description }}{% endblock description %}">
|
<meta name="description" content="{% block description %}{{ config.description }}{% endblock description %}">
|
||||||
|
<meta name="author" content="{{ config.extra.author }}">
|
||||||
|
<link rel="canonical" href="{% block canonical %}{{ config.base_url }}{% endblock canonical %}">
|
||||||
|
<!-- Open Graph -->
|
||||||
|
<meta property="og:title" content="{% block og_title %}{{ config.title }}{% endblock og_title %}">
|
||||||
|
<meta property="og:description" content="{% block og_description %}{{ config.description }}{% endblock og_description %}">
|
||||||
|
<meta property="og:url" content="{% block og_url %}{{ config.base_url }}{% endblock og_url %}">
|
||||||
|
<meta property="og:site_name" content="{{ config.title }}">
|
||||||
|
<meta property="og:type" content="{% block og_type %}website{% endblock og_type %}">
|
||||||
|
{% block og_extra %}{% endblock og_extra %}
|
||||||
|
<!-- Twitter Card -->
|
||||||
|
<meta name="twitter:card" content="summary">
|
||||||
|
<meta name="twitter:title" content="{% block twitter_title %}{{ config.title }}{% endblock twitter_title %}">
|
||||||
|
<meta name="twitter:description" content="{% block twitter_description %}{{ config.description }}{% endblock twitter_description %}">
|
||||||
<link rel="stylesheet" href="{{ get_url(path='style.css') }}">
|
<link rel="stylesheet" href="{{ get_url(path='style.css') }}">
|
||||||
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path='rss.xml') }}">
|
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path='rss.xml') }}">
|
||||||
<!-- Favicon -->
|
<!-- Favicon -->
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,15 @@
|
||||||
|
|
||||||
{% block description %}{% if page.description %}{{ page.description }}{% else %}{{ config.description }}{% endif %}{% endblock description %}
|
{% block description %}{% if page.description %}{{ page.description }}{% else %}{{ config.description }}{% endif %}{% endblock description %}
|
||||||
|
|
||||||
|
{% block canonical %}{{ page.permalink }}{% endblock canonical %}
|
||||||
|
{% block og_title %}{{ page.title }}{% endblock og_title %}
|
||||||
|
{% block og_description %}{% if page.description %}{{ page.description }}{% else %}{{ config.description }}{% endif %}{% endblock og_description %}
|
||||||
|
{% block og_url %}{{ page.permalink }}{% endblock og_url %}
|
||||||
|
{% block og_type %}article{% endblock og_type %}
|
||||||
|
{% block og_extra %}{% if page.date %}<meta property="article:published_time" content="{{ page.date }}">{% endif %}{% endblock og_extra %}
|
||||||
|
{% block twitter_title %}{{ page.title }}{% endblock twitter_title %}
|
||||||
|
{% block twitter_description %}{% if page.description %}{{ page.description }}{% else %}{{ config.description }}{% endif %}{% endblock twitter_description %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<article>
|
<article>
|
||||||
<header class="post-header">
|
<header class="post-header">
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,15 @@
|
||||||
|
|
||||||
{% block title %}{{ section.title }} - {{ config.title }}{% endblock title %}
|
{% block title %}{{ section.title }} - {{ config.title }}{% endblock title %}
|
||||||
|
|
||||||
|
{% block description %}{% if section.description %}{{ section.description }}{% else %}{{ config.description }}{% endif %}{% endblock description %}
|
||||||
|
|
||||||
|
{% block canonical %}{{ section.permalink }}{% endblock canonical %}
|
||||||
|
{% block og_title %}{{ section.title }} - {{ config.title }}{% endblock og_title %}
|
||||||
|
{% block og_description %}{% if section.description %}{{ section.description }}{% else %}{{ config.description }}{% endif %}{% endblock og_description %}
|
||||||
|
{% block og_url %}{{ section.permalink }}{% endblock og_url %}
|
||||||
|
{% block twitter_title %}{{ section.title }} - {{ config.title }}{% endblock twitter_title %}
|
||||||
|
{% block twitter_description %}{% if section.description %}{{ section.description }}{% else %}{{ config.description }}{% endif %}{% endblock twitter_description %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>{{ section.title }}</h1>
|
<h1>{{ section.title }}</h1>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue