Commits

faassen committed 710bfeb

Remove google analytics account name configuration to config file.

  • Participants
  • Parent commits 9fcb72d

Comments (0)

Files changed (3)

 
 [disqus]
 name = devrantblaag
+
+[google_analytics]
+account = UA-27784490-1
         'page_title': title,
         'blaag_title': title,
         'author': config.get('content', 'author'),
+        'google_analytics_account': config.get('google_analytics', 'account'),
         }
 
     for parts in data: 
                 threadid=htmltitle,
                 disqus_name=disqus_name)
             blaag_html = blaag_tpl.substitute(parts, comments=fullcomments)
-            target.write(page_tpl.substitute(parts, title=parts['title'], 
-                                             links=links,
-                                             main=blaag_html,
-                                             disqus_name=disqus_name).encode("utf-8"))
+            target.write(page_tpl.substitute(
+                    parts,
+                    title=parts['title'], 
+                    links=links,
+                    main=blaag_html,
+                    ).encode("utf-8"))
             #Append post to main page
             shortcomments = comments_short_tpl.substitute(parts, 
                                                           link=get_url(parts), 
                                              link=get_url(parts)))
     #Write main page
     with open(os.path.join(html_path, "index.html"), "w") as target:
-        target.write(page_tpl.substitute(defaults, links=links, 
-                                         main="\n".join(main)).encode("utf-8"))
+        target.write(page_tpl.substitute(
+                defaults,
+                links=links, 
+                main="\n".join(main)).encode("utf-8"))
     #Write rss
 
     description = config.get('content', 'description')

File templates/pagetemplate.html

       </footer>
     </section>
     
-    <!-- Add JavaScript after this point, it makes the page load faster when client does not need to intrepret JS at start -->
+    <!-- Add JavaScript after this point, it makes the page load faster when client does not need to interpret JS at start -->
     <script type="text/javascript">
       var _gaq = _gaq || [];
-      _gaq.push(['_setAccount', 'UA-27784490-1']);
+      _gaq.push(['_setAccount', '${google_analytics_account}']);
       _gaq.push(['_trackPageview']);
       (function() {
         var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;