From 42ba09847b4df973c56c48c795548ffa7e532f6b Mon Sep 17 00:00:00 2001 From: Tobias Schmidl Date: Mon, 11 Jan 2016 15:36:19 +0100 Subject: 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. --- cebong/templates/article.html | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'cebong/templates/article.html') diff --git a/cebong/templates/article.html b/cebong/templates/article.html index 2308d67..15569d4 100644 --- a/cebong/templates/article.html +++ b/cebong/templates/article.html @@ -1,5 +1,33 @@ {% extends "base.html" %} +{% block robots %} +{% if article.robots %}{{ article.robots }}{% else %}index,follow{% endif %} +{% endblock %} +{% block head_description %} +{% if article.summary %} +{{ article.summary|striptags }} +{% endif %} +{% endblock head_description %} {% block title %}{{ article.title|striptags }}{% endblock %} +{% block meta_tags_in_head %} +{% if article.tags and article.category %} + +{% endif %} +{% if article.category %} + +{% endif %} +{% if article.description %} + +{% elif article.summary %} + +{% endif %} +{% if article.author %} + + +{% endif %} +{% if article.date %} + +{% endif %} +{% endblock meta_tags_in_head %} {% block content %}
-- cgit