aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schmidl <tobias@schmidl.cc>2017-10-25 07:19:20 +0200
committerTobias Schmidl <tobias.schmidl@corpuls.com>2018-05-11 11:31:19 +0200
commitde0a6de5263937e6b4e59c3d079dff2450916880 (patch)
tree4675394ae0b62df19b91016df4c654427661c69e
parent8b244609f5f6fcce30c5324cfa8b1e5c4df0e199 (diff)
downloadpelican-themes-de0a6de5263937e6b4e59c3d079dff2450916880.tar.gz
Just Read: Extended metadata block for non-article pages
-rw-r--r--Just-Read/templates/base.html50
1 files changed, 38 insertions, 12 deletions
diff --git a/Just-Read/templates/base.html b/Just-Read/templates/base.html
index a61b22b..715b8c4 100644
--- a/Just-Read/templates/base.html
+++ b/Just-Read/templates/base.html
@@ -14,9 +14,7 @@
<meta name="author" content="{{ AUTHOR }}" />
<meta name="copyright" content="{{ AUTHOR }}" />
{% endif %}
-
<meta property="og:site_name" content="{{SITENAME}}" />
-
{% if GOOGLE_PLUS_PROFILE_URL %}
<link rel="author" href={{GOOGLE_PLUS_PROFILE_URL}} />
{% endif %}
@@ -24,9 +22,8 @@
<meta name="twitter:site" content="@{{TWITTER_USERNAME}}" />
<meta name="twitter:creator" content="@{{TWITTER_USERNAME}}" />
{% endif %}
-
- {%if article %}
<meta name="twitter:card" content="summary" />
+ {%if article %}
<meta name="twitter:title" content="{{article.title}}" />
<meta name="date" content="{{article.date}}" />
<meta property="og:type" content="article" />
@@ -34,21 +31,50 @@
<meta property="og:published_time" content="{{article.date}}" />
<meta property="og:title" content="{{article.title}}" />
<meta property="og:url" content="{{SITEURL}}/{{ article.url }}" />
- {% if article.featured_image %}
+ {% if article.featured_image %}
<meta property="og:image" content="{{ article.featured_image }}" />
- {% endif %}
- {%if DESCRIPTION %}
+ {% endif %}
+ {%if DESCRIPTION %}
<meta property="og:description" content="{{DESCRIPTION}} " />
<meta name="description" content="{{DESCRIPTION}}" />
- {%else %}
+ {%else %}
<meta property="og:description" content="{{article.summary|striptags}}" />
<meta name="description" content="{{article.summary|striptags}}" />
- {% endif %}
- {%if FACEBOOK_PROFILE_URL %}
+ {% endif %}
+ {%if FACEBOOK_PROFILE_URL %}
<meta property="article:author" content="{{FACEBOOK_PROFILE_URL}}" />
+ {% endif %}
+ {% elif page %}
+ <meta name="twitter:title" content="{{page.title}}" />
+ <meta name="date" content="{{page.date}}" />
+ <meta property="og:type" content="website" />
+ <meta property="og:locale" content="{{page.lang}}" />
+ <meta property="og:published_time" content="{{page.date}}" />
+ <meta property="og:title" content="{{page.title}}" />
+ <meta property="og:url" content="{{SITEURL}}/{{ page.url }}" />
+ {% if page.featured_image %}
+ <meta property="og:image" content="{{ page.featured_image }}" />
+ {% endif %}
+ {%if DESCRIPTION %}
+ <meta property="og:description" content="{{DESCRIPTION}} " />
+ <meta name="description" content="{{DESCRIPTION}}" />
+ {%else %}
+ <meta property="og:description" content="{{page.summary|striptags}}" />
+ <meta name="description" content="{{page.summary|striptags}}" />
+ {% endif %}
+ {% else %}
+ <meta name="twitter:title" content="{{SITENAME}}" />
+ <meta property="og:type" content="website" />
+ {% if DEFAULT_LANG %}
+ <meta property="og:locale" content="{{DEFAULT_LANG}}" />
+ {% endif %}
+ <meta property="og:title" content="{{SITENAME}}" />
+ <meta property="og:url" content="{{SITEURL}}/{{ output_file }}" />
+ {%if DESCRIPTION %}
+ <meta property="og:description" content="{{DESCRIPTION}} " />
+ <meta name="description" content="{{DESCRIPTION}}" />
+ {% endif %}
{% endif %}
- {% endif %}
-
<meta name="HandheldFriendly" content="True" />
<meta name="MobileOptimized" content="320" />
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0" />