mirror of
https://github.com/c0de-archive/pelican-mg.git
synced 2024-12-22 08:22:40 +00:00
Added Schema.org and Twitter cards
This commit is contained in:
parent
beb6d75d5f
commit
ba2dc37ae7
@ -11,12 +11,18 @@
|
|||||||
<meta name="description" content="{% block description %}{{ SITE_DESCRIPTION }}{% endblock %}">
|
<meta name="description" content="{% block description %}{{ SITE_DESCRIPTION }}{% endblock %}">
|
||||||
<meta name="author" content="{{ AUTHOR }}">
|
<meta name="author" content="{{ AUTHOR }}">
|
||||||
<meta name="copyright" content="{{ AUTHOR }}">
|
<meta name="copyright" content="{{ AUTHOR }}">
|
||||||
|
<meta name="twitter:card" content="summary" />
|
||||||
|
<meta name="twitter:site" content="{{ TWITTER_USERNAME }}" />
|
||||||
|
<meta property="og:site_name" content="{{ SITENAME }}" />
|
||||||
{% if article %}
|
{% if article %}
|
||||||
<meta property="og:title" content="{{ article.title|capitalize }}" />
|
<meta property="og:title" content="{{ article.title|capitalize }}" />
|
||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />
|
||||||
<meta property="og:url" content="{{ SITEURL }}/{{ article.url }}" />
|
<meta property="og:url" content="{{ SITEURL }}/{{ article.url }}" />
|
||||||
|
<meta name="twitter:title" content="{{ article.title|capitalize }}" />
|
||||||
|
<meta name="twitter:url" content="{{ SITEURL }}/{{ article.url }}" />
|
||||||
{% if article.summary %}
|
{% if article.summary %}
|
||||||
<meta property="og:description" content="{{ article.summary }}" />
|
<meta property="og:description" content="{{ article.summary }}" />
|
||||||
|
<meta name="twitter:description" content="{{ article.summary }}" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if article.date %}
|
{% if article.date %}
|
||||||
<meta property="og:article:published_time" content="{{ article.date }}">
|
<meta property="og:article:published_time" content="{{ article.date }}">
|
||||||
@ -30,17 +36,38 @@
|
|||||||
{% for tag in article.tags %}
|
{% for tag in article.tags %}
|
||||||
<meta property="og:article:tag" content="{{ tag }}">
|
<meta property="og:article:tag" content="{{ tag }}">
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% if article.image %}
|
||||||
|
<meta property="og:image" content="{{ SITEURL }}/static/{{ article.image }}" />
|
||||||
|
<meta name="twitter:image" content="{{ SITEURL }}/static/{{ article.image }}" />
|
||||||
|
{% endif %}
|
||||||
{% elif page %}
|
{% elif page %}
|
||||||
<meta property="og:title" content="{{ page.title|capitalize }}" />
|
<meta property="og:title" content="{{ page.title|capitalize }}" />
|
||||||
<meta property="og:type" content="website" />
|
<meta property="og:type" content="website" />
|
||||||
<meta property="og:url" content="{{ SITEURL }}/{{ page.url }}" />
|
<meta property="og:url" content="{{ SITEURL }}/{{ page.url }}" />
|
||||||
|
<meta name="twitter:url" content="{{ SITEURL }}/{{ page.url }}" />
|
||||||
|
{% if page.image %}
|
||||||
|
<meta property="og:image" content="{{ SITEURL }}/static/{{ page.image }}" />
|
||||||
|
<meta name="twitter:image" content="{{ SITEURL }}/static/{{ page.image }}" />
|
||||||
|
{% endif %}
|
||||||
|
{% if page.summary %}
|
||||||
|
<meta property="og:description" content="{{ page.summary }}" />
|
||||||
|
<meta name="twitter:description" content="{{ page.summary }}" />
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<meta property="og:title" content="{{ SITENAME }}" />
|
<meta property="og:title" content="{{ SITENAME }}" />
|
||||||
<meta property="og:type" content="website" />
|
<meta property="og:type" content="website" />
|
||||||
<meta property="og:url" content="{{ SITEURL }}" />
|
<meta property="og:url" content="{{ SITEURL }}" />
|
||||||
|
<meta name="twitter:url" content="{{ SITEURL }}" />
|
||||||
|
{% if SITE_DESCRIPTION %}
|
||||||
|
<meta property="og:description" content="{{ SITE_DESCRIPTION }}" />
|
||||||
|
<meta name="twitter:description" content="{{ SITE_DESCRIPTION }}" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if OG_IMAGE %}
|
||||||
<meta property="og:image" content="{{ SITEURL }}/static/{{ OG_IMAGE }}" />
|
<meta property="og:image" content="{{ SITEURL }}/static/{{ OG_IMAGE }}" />
|
||||||
<meta property="og:image:type" content="{{ OG_IMAGE_TYPE }}" />
|
<meta property="og:image:type" content="{{ OG_IMAGE_TYPE }}" />
|
||||||
|
<meta name="twitter:image" content={{ SITEURL }}/static/{{ OG_IMAGE }}"" />
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<link href="{{ SITEURL }}/{{ FEED_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} ATOM Feed"/>
|
<link href="{{ SITEURL }}/{{ FEED_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} ATOM Feed"/>
|
||||||
<link href='//fonts.googleapis.com/css?family=Open+Sans:800italic' rel='stylesheet' type='text/css'>
|
<link href='//fonts.googleapis.com/css?family=Open+Sans:800italic' rel='stylesheet' type='text/css'>
|
||||||
|
Loading…
Reference in New Issue
Block a user