[gimp-web] themes: add og:type "article" and published_time metadata.



commit 6a56c5b73dc7bdce1ad8ec765a641f6d02805e73
Author: Jehan <jehan girinstud io>
Date:   Tue Oct 19 00:36:49 2021 +0200

    themes: add og:type "article" and published_time metadata.
    
    Also some cleanup/reorganization of metadata.

 themes/newgimp/templates/article.html | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/themes/newgimp/templates/article.html b/themes/newgimp/templates/article.html
index 39459828..09bb385f 100644
--- a/themes/newgimp/templates/article.html
+++ b/themes/newgimp/templates/article.html
@@ -23,23 +23,25 @@
 
     <link rel='stylesheet' type='text/css' href="/theme/css/article.css" />
 
-    <meta itemprop='url' content='{{ SITEURL }}/{{ article.url }}' />
-    <meta itemprop='name' content='{{ SITENAME }} - {{ article.title|striptags }}' />
-  {% if article.image %}
-    <meta itemprop='image' content='{{ article.image }}' />
-  {% else %}
-    <meta itemprop='image' content='{{ SITEURL }}/images/frontpage/wilber-big.png' />
-  {% endif %}
+    <meta property='og:type' content='article' />
+    <meta property='article:published_time' content='{{ article.date.isoformat() }}' />
 
+    <meta itemprop='url' content='{{ SITEURL }}/{{ article.url }}' />
     <meta property='og:url' content='{{ SITEURL }}/{{ article.url }}' />
+
+    <meta itemprop='name' content='{{ SITENAME }} - {{ article.title|striptags }}' />
     <meta property='og:title' content='{{ SITENAME }} - {{ article.title|striptags }}' />
+
   {% if article.image %}
     {% if article.image[0] == '/' %}
+    <meta itemprop='image' content='{{ SITEMAP_SITEURL }}{{ article.image }}' />
     <meta property='og:image' content='{{ SITEMAP_SITEURL }}{{ article.image }}' />
     {% else %}
+    <meta itemprop='image' content='{{ SITEMAP_SITEURL }}/{{ article.url }}/{{ article.image }}' />
     <meta property='og:image' content='{{ SITEMAP_SITEURL }}/{{ article.url }}/{{ article.image }}' />
     {% endif %}
   {% else %}
+    <meta itemprop='image' content='{{ SITEURL }}/images/frontpage/wilber-big.png' />
     <meta property='og:image' content='{{ SITEURL }}/images/frontpage/wilber-big.png' />
   {% endif %}
 
@@ -59,7 +61,6 @@
     {% endif %}
 
 
-
 {% endblock head %}
 
 {% block content %}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]