constance

Scripts for generating (an earlier obsolete version of) my personal web site
git clone https://code.djc.id.au/git/constance/
commit 6e842888c4231c91970f2946f595e24104fd8e40
parent 8d48734ca6a00fc567c673c28b65492d4ca0b3a0
Author: Dan Callaghan <djc@djc.id.au>
Date:   Fri, 21 Jun 2013 22:25:04 +1000

URL normalization for Disqus

Diffstat:
Mtemplates/blog/entry.html | 1+
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/templates/blog/entry.html b/templates/blog/entry.html
@@ -29,6 +29,7 @@ from viewutils import tag_list
         <py:if test="config.get('disqus', 'site')">
         <div id="disqus_thread"></div>
         <script type="text/javascript">
+          var disqus_url = 'http://' + window.location.host + window.location.pathname.replace(/\.html$/, '');
           (function() {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = 'http://${config.get("disqus", "site")}.disqus.com/embed.js';