[gimp-web/testing] Added 'canonical' attribute parsing to pages
- From: Pat David <patdavid src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-web/testing] Added 'canonical' attribute parsing to pages
- Date: Mon, 2 May 2016 18:22:09 +0000 (UTC)
commit 5d3291282666a1fa0726705cba6c52929ec02d6c
Author: Pat David <patdavid gmail com>
Date: Mon May 2 13:20:28 2016 -0500
Added 'canonical' attribute parsing to pages
If a page frontmatter has a 'canonical' attribute, use it for
a <link rel='canonical' href='{LINK}'/> tag in the <head> of
the page.
themes/newgimp/templates/article.html | 1 +
themes/newgimp/templates/page.html | 4 ++++
2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/themes/newgimp/templates/article.html b/themes/newgimp/templates/article.html
index 168cbb4..09893c2 100644
--- a/themes/newgimp/templates/article.html
+++ b/themes/newgimp/templates/article.html
@@ -47,6 +47,7 @@
{% endif %}
+
{% endblock head %}
{% block content %}
diff --git a/themes/newgimp/templates/page.html b/themes/newgimp/templates/page.html
index ea2735a..006015a 100644
--- a/themes/newgimp/templates/page.html
+++ b/themes/newgimp/templates/page.html
@@ -30,6 +30,10 @@
<meta property='og:description' content="{{ page.content|striptags|truncate() }}" />
{% endif %}
+ {% if page.canonical %}
+ <link rel='canonical' href='{{ page.canonical }}' />
+ {% endif %}
+
{% endblock head %}
{% block content %}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]