From 36565ea168d1f7febe1918d1a9f25d651b489305 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 7 Oct 2016 22:02:09 +0100 Subject: [PATCH] add piwik code --- config/config.yml | 4 ++++ config/pelicanconf.py | 1 + theme/templates/base.html | 2 ++ theme/templates/extras/piwik.html | 18 ++++++++++++++++++ 4 files changed, 25 insertions(+) create mode 100644 theme/templates/extras/piwik.html diff --git a/config/config.yml b/config/config.yml index e4870fe..9f71cda 100644 --- a/config/config.yml +++ b/config/config.yml @@ -103,3 +103,7 @@ footer_accounts: - instagram - youtube - flickr + +piwik: + url: piwik.theorangeone.net + site_id: 1 diff --git a/config/pelicanconf.py b/config/pelicanconf.py index f0beea9..41c225a 100644 --- a/config/pelicanconf.py +++ b/config/pelicanconf.py @@ -34,6 +34,7 @@ REPO = Repo(search_parent_directories=True) BUILD_PRODUCTION = 'BUILD_PRODUCTION' in os.environ from plugins import image_resizer META_IMAGES = image_resizer.generate() +PIWIK = settings.piwik # Disable some pages TAG_URL = False diff --git a/theme/templates/base.html b/theme/templates/base.html index d3dea09..845daa8 100644 --- a/theme/templates/base.html +++ b/theme/templates/base.html @@ -18,6 +18,8 @@ {% block htmltitle %}Page{% endblock %} - {{ SITENAME }} + + {% include "extras/piwik.html" with context %} {% block navbar %} diff --git a/theme/templates/extras/piwik.html b/theme/templates/extras/piwik.html new file mode 100644 index 0000000..335772b --- /dev/null +++ b/theme/templates/extras/piwik.html @@ -0,0 +1,18 @@ +{% if BUILD_PRODUCTION %} + + + + +{% endif %}