From: Fuchs Date: Thu, 21 Jun 2018 15:06:06 +0000 (+0200) Subject: add support for robots meta tag X-Git-Url: https://jfr.im/git/irc/freenode/web-7.0.git/commitdiff_plain/7cd640de438c7f87878e73024b60b89721ee5315?hp=23805a0c05d4f103b27a7355e0717c6eaa0a65d3 add support for robots meta tag --- diff --git a/templates/article.html b/templates/article.html index eddabe452..578a50995 100644 --- a/templates/article.html +++ b/templates/article.html @@ -1,6 +1,7 @@ {% extends "base.html" %} {% import "artinfo.html" as artinfo with context %} {% set title=article.title %} +{% set robots=article.robots %} {% block content %}
{%- if article.source.meta.imported is defined %} diff --git a/templates/base.html b/templates/base.html index 099e1c06a..84b55ba1c 100644 --- a/templates/base.html +++ b/templates/base.html @@ -7,6 +7,9 @@ {#- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags #} + {%- if robots is defined and robots is not none %} + + {%- endif %} {%- block links %} diff --git a/templates/faq.html b/templates/faq.html index 344592245..f6bbf8bca 100644 --- a/templates/faq.html +++ b/templates/faq.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% set title = entry.title %} +{% set robots = entry.robots %} {% block content %}

{{ entry.title }}

diff --git a/templates/page.html b/templates/page.html index 71328303d..ab0a7a1ef 100644 --- a/templates/page.html +++ b/templates/page.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% set title = page.title %} +{% set robots = page.robots %} {% block content %}

{{ page.title }}