From 44cadf7c1f4c3026f419bf76a638ca77003aabee Mon Sep 17 00:00:00 2001 From: asselinpaul Date: Thu, 14 Jun 2012 23:04:23 +0200 Subject: [PATCH 1/2] added GoSquared support GoSquared(analytics) support added in default themes and documentation (in French and English) --- README.rst | 2 +- docs/fr/configuration.rst | 3 +++ docs/settings.rst | 1 + pelican/themes/notmyidea/templates/gosquared.html | 14 ++++++++++++++ pelican/themes/simple/templates/gosquared.html | 14 ++++++++++++++ 5 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 pelican/themes/notmyidea/templates/gosquared.html create mode 100644 pelican/themes/simple/templates/gosquared.html diff --git a/README.rst b/README.rst index 5012bb9c..4f4edb61 100644 --- a/README.rst +++ b/README.rst @@ -26,7 +26,7 @@ Pelican currently supports: * Atom/RSS feeds * Code syntax highlighting * Import from WordPress, Dotclear, or RSS feeds -* Integration with external tools: Twitter, Google Analytics, etc. (optional) +* Integration with external tools: Twitter, Google Analytics, GoSquared, etc. (optional) Have a look at `the documentation `_ for more information. diff --git a/docs/fr/configuration.rst b/docs/fr/configuration.rst index 695a0b0e..fadaf258 100644 --- a/docs/fr/configuration.rst +++ b/docs/fr/configuration.rst @@ -98,6 +98,9 @@ GITHUB_URL : GOOGLE_ANALYTICS : 'UA-XXXX-YYYY' pour activer Google analytics ; + +GOSQUARED_SITENAME : + 'XXX-YYYYYY-X' pour activer GoSquared ; JINJA_EXTENSIONS : Liste d'extension Jinja2 que vous souhaitez utiliser ; diff --git a/docs/settings.rst b/docs/settings.rst index b36c9953..416c22d4 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -398,6 +398,7 @@ Setting name What does it do ? `GITHUB_URL` Your GitHub URL (if you have one). It will then use this information to create a GitHub ribbon. `GOOGLE_ANALYTICS` 'UA-XXXX-YYYY' to activate Google Analytics. +`GOSQUARED_SITENAME` 'XXX-YYYYYY-X' to activate GoSquared. `MENUITEMS` A list of tuples (Title, URL) for additional menu items to appear at the beginning of the main menu. `PIWIK_URL` URL to your Piwik server - without 'http://' at the diff --git a/pelican/themes/notmyidea/templates/gosquared.html b/pelican/themes/notmyidea/templates/gosquared.html new file mode 100644 index 00000000..f47efcf4 --- /dev/null +++ b/pelican/themes/notmyidea/templates/gosquared.html @@ -0,0 +1,14 @@ +{% if GOSQUARED_SITENAME %} + +{% endif %} diff --git a/pelican/themes/simple/templates/gosquared.html b/pelican/themes/simple/templates/gosquared.html new file mode 100644 index 00000000..f47efcf4 --- /dev/null +++ b/pelican/themes/simple/templates/gosquared.html @@ -0,0 +1,14 @@ +{% if GOSQUARED_SITENAME %} + +{% endif %} From d1dfcdafc229b788bf48f08964836ff17eace4f0 Mon Sep 17 00:00:00 2001 From: asselinpaul Date: Thu, 14 Jun 2012 23:32:23 +0200 Subject: [PATCH 2/2] updated remove GoSqaured from README and template file from the notmyidea theme. --- README.rst | 2 +- pelican/themes/notmyidea/templates/.DS_Store | Bin 0 -> 6148 bytes .../themes/notmyidea/templates/gosquared.html | 14 -------------- 3 files changed, 1 insertion(+), 15 deletions(-) create mode 100644 pelican/themes/notmyidea/templates/.DS_Store delete mode 100644 pelican/themes/notmyidea/templates/gosquared.html diff --git a/README.rst b/README.rst index 4f4edb61..5012bb9c 100644 --- a/README.rst +++ b/README.rst @@ -26,7 +26,7 @@ Pelican currently supports: * Atom/RSS feeds * Code syntax highlighting * Import from WordPress, Dotclear, or RSS feeds -* Integration with external tools: Twitter, Google Analytics, GoSquared, etc. (optional) +* Integration with external tools: Twitter, Google Analytics, etc. (optional) Have a look at `the documentation `_ for more information. diff --git a/pelican/themes/notmyidea/templates/.DS_Store b/pelican/themes/notmyidea/templates/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 - var GoSquared={}; - GoSquared.acct = "{{ GOSQUARED_SITENAME }}"; - (function(w){ - function gs(){ - w._gstc_lt=+(new Date); var d=document; - var g = d.createElement("script"); g.type = "text/javascript"; g.async = true; g.src = "//d1l6p2sc9645hc.cloudfront.net/tracker.js"; - var s = d.getElementsByTagName("script")[0]; s.parentNode.insertBefore(g, s); - } - w.addEventListener?w.addEventListener("load",gs,false):w.attachEvent("onload",gs); - })(window); - -{% endif %}