# HG changeset patch # User David Douard # Date 1668104124 -3600 # Node ID 11e6db4102f1ee301c37332d3ccf12562594967a # Parent 202ad178f68fd76a90cdfdb69f3ff180aa3f9e29 Better fix for matomo integration diff -r 202ad178f68f -r 11e6db4102f1 pelicanconf.py --- a/pelicanconf.py Thu Nov 10 18:52:14 2022 +0100 +++ b/pelicanconf.py Thu Nov 10 19:15:24 2022 +0100 @@ -3,7 +3,7 @@ from __future__ import unicode_literals import socket -isprod = socket.gethostname() == 'sd-56079' +isprod = socket.gethostname() == 'sdfa3' AUTHOR = u'David Douard' SITENAME = u'Whatever' @@ -15,26 +15,30 @@ if isprod: SITEURL = 'https://whatever.sdfa3.org' - PIWIK = ''' + MATOMO_JS = ''' - ''' + MATOMO_IMG = ''' + + ''' else: SITEURL = '' - PIWIK = '' + MATOMO_JS = '' + MATOMO_IMG = '' PATH = 'content' diff -r 202ad178f68f -r 11e6db4102f1 publishconf.py --- a/publishconf.py Thu Nov 10 18:52:14 2022 +0100 +++ b/publishconf.py Thu Nov 10 19:15:24 2022 +0100 @@ -18,9 +18,3 @@ DELETE_OUTPUT_DIRECTORY = True -MATOMO_JS = True - -# Following items are often useful when publishing - -#DISQUS_SITENAME = "" -#GOOGLE_ANALYTICS = "" diff -r 202ad178f68f -r 11e6db4102f1 theme/templates/base.html --- a/theme/templates/base.html Thu Nov 10 18:52:14 2022 +0100 +++ b/theme/templates/base.html Thu Nov 10 19:15:24 2022 +0100 @@ -35,20 +35,8 @@ {% if TAG_FEED_RSS and tag %} {% endif %} - {% if MATOMO_JS %} - + {% if MATOMO_JS%} + {{MATOMO_JS}} {% endif %} {% if article %} {% if article.stylesheets %} @@ -146,9 +134,8 @@ {% include 'trademark.html' %} - {% if MATOMO_IMG %} - + {{MATOMO_IMG}} {% endif %}