From ac0b1a6f823777174a26d9ae402d9ae0b1a730c2 Mon Sep 17 00:00:00 2001 From: derdon Date: Mon, 13 Jun 2011 01:25:29 +0200 Subject: [PATCH 1/3] check only paths (i.e. not None) for being absolute when reading the settings --- pelican/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/settings.py b/pelican/settings.py index bc866494..356de1b4 100644 --- a/pelican/settings.py +++ b/pelican/settings.py @@ -77,7 +77,7 @@ def read_settings(filename): # Make the paths relative to the settings file for path in ['PATH', 'OUTPUT_PATH']: if path in context: - if not os.path.isabs(context[path]): + if path is not None and not os.path.isabs(context[path]): context[path] = os.path.abspath(os.path.normpath(os.path.join(os.path.dirname(filename), context[path]))) # set the locale From 128867630252e05f3d557383a1b7539e7a78893c Mon Sep 17 00:00:00 2001 From: derdon Date: Mon, 13 Jun 2011 01:34:36 +0200 Subject: [PATCH 2/3] check the actual value in the settings --- pelican/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/settings.py b/pelican/settings.py index 356de1b4..1b32395c 100644 --- a/pelican/settings.py +++ b/pelican/settings.py @@ -77,7 +77,7 @@ def read_settings(filename): # Make the paths relative to the settings file for path in ['PATH', 'OUTPUT_PATH']: if path in context: - if path is not None and not os.path.isabs(context[path]): + if context[path] is not None and not os.path.isabs(context[path]): context[path] = os.path.abspath(os.path.normpath(os.path.join(os.path.dirname(filename), context[path]))) # set the locale From 94b15b5260727bbe8babb94bdea7149db8b2573a Mon Sep 17 00:00:00 2001 From: Jochen Breuer Date: Mon, 13 Jun 2011 07:30:33 +0200 Subject: [PATCH 3/3] Added template, inlcude in base and some documentation for Piwik. --- docs/settings.rst | 6 ++++++ pelican/themes/notmyidea/templates/base.html | 1 + pelican/themes/notmyidea/templates/piwik.html | 16 ++++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 pelican/themes/notmyidea/templates/piwik.html diff --git a/docs/settings.rst b/docs/settings.rst index 355716e9..9c596da3 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -208,6 +208,12 @@ Setting name what does it do ? `GITHUB_URL` Your github URL (if you have one), it will then use it to create a github ribbon. `GOOGLE_ANALYTICS` 'UA-XXXX-YYYY' to activate google analytics. +`PIWIK_URL` URL to your Piwik server - without 'http://' at the + beginning. +`PIWIK_SSL_URL` If the SSL-URL differs from the normal Piwik-URL + you have to include this setting too. (optional) +`PIWIK_SITE_ID` ID for the monitored website. You can find the ID + in the Piwik admin interface > settings > websites. `LINKS` A list of tuples (Title, Url) for links to appear on the header. `SOCIAL` A list of tuples (Title, Url) to appear in the "social" diff --git a/pelican/themes/notmyidea/templates/base.html b/pelican/themes/notmyidea/templates/base.html index 6a5cfaf5..ad7039a8 100644 --- a/pelican/themes/notmyidea/templates/base.html +++ b/pelican/themes/notmyidea/templates/base.html @@ -81,6 +81,7 @@ {% include 'analytics.html' %} +{% include 'piwik.html' %} {% include 'disqus_script.html' %} diff --git a/pelican/themes/notmyidea/templates/piwik.html b/pelican/themes/notmyidea/templates/piwik.html new file mode 100644 index 00000000..ff459af7 --- /dev/null +++ b/pelican/themes/notmyidea/templates/piwik.html @@ -0,0 +1,16 @@ +{% if PIWIK_URL and PIWIK_SITE_ID %} + +{% endif %} \ No newline at end of file