aboutsummaryrefslogtreecommitdiffstats
path: root/cebong/templates/page.html
diff options
context:
space:
mode:
authorTobias Schmidl <T.Schmidl@erhardt-leimer.com>2016-01-11 15:36:19 +0100
committerTobias Schmidl <T.Schmidl@erhardt-leimer.com>2016-01-11 15:36:19 +0100
commit42ba09847b4df973c56c48c795548ffa7e532f6b (patch)
tree3cb0b84b2e60621cf4882337276201c34c46fc6f /cebong/templates/page.html
parent704b2ded906270399b20a5e49fd30fc843ec5f4c (diff)
downloadpelican-themes-42ba09847b4df973c56c48c795548ffa7e532f6b.tar.gz
Added metadata
We want to populate various HTML metatags from pelican. The data is there, we just have to put in HTML! To be more precise, the meta names "keywords", "category", "description", "author", "robots" and "date" are taken from pelican variables.
Diffstat (limited to 'cebong/templates/page.html')
-rw-r--r--cebong/templates/page.html25
1 files changed, 23 insertions, 2 deletions
diff --git a/cebong/templates/page.html b/cebong/templates/page.html
index 9635fb8..54fe19e 100644
--- a/cebong/templates/page.html
+++ b/cebong/templates/page.html
@@ -1,7 +1,28 @@
{% extends "base.html" %}
{% block title %}{{ page.title }}{% endblock %}
-{% block content %}
-<section id="content" class="body">
+{% block robots %}
+{% if page.robots %}{{ page.robots }}{% else %}index,follow{% endif %}
+{% endblock %}
+{% block meta_tags_in_head %}
+{% if page.tags and page.category %}
+ <meta name="keywords" content="{{ [page.tags|join(', '), page.category]|join(', ') }}" />
+{% endif %}
+{% if page.category %}
+ <meta name="category" content="{{ page.category|striptags }}" />
+{% endif %}
+{% if page.description %}
+ <meta name="description" content="{{ page.description|striptags }}" />
+{% elif page.summary %}
+ <meta name="description" content="{{ page.summary|striptags }}" />
+{% endif %}
+{% if page.author %}
+ <meta name="author" content="{{ page.author }}" />
+ <meta name="copyright" content="{{ page.author }}" />
+{% endif %}
+{% endblock meta_tags_in_head %}
+
+{% block content %}
+<section id="content" class="body">
<h1 class="entry-title">{{ page.title }}</h1>
{% if PDF_PROCESSOR %}<a href="{{ SITEURL }}/pdf/{{ page.slug }}.pdf">get
the pdf</a>{% endif %}