1
0
Fork 0
forked from github/pelican

- Added configurable Google analytics template

(GOOGLE_ANALYTICS='UA-XXXX-YYYY' in your settings file)
This commit is contained in:
Jerome 2010-11-15 23:47:44 +08:00 committed by Alexis Metaireau
commit caacf48848
2 changed files with 19 additions and 7 deletions

View file

@ -0,0 +1,11 @@
{% if GOOGLE_ANALYTICS %}
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("{{GOOGLE_ANALYTICS}}");
pageTracker._trackPageview();
} catch(err) {}</script>
{% endif %}

View file

@ -9,11 +9,11 @@
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<!--[if lte IE 7]>
<link rel="stylesheet" type="text/css" media="all" href="{{ SITEURL }}/css/ie.css"/>
<script src="{{ SITEURL }}/js/IE8.js" type="text/javascript"></script><![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" media="all" href="{{ SITEURL }}/css/ie6.css"/><![endif]-->
@ -21,7 +21,7 @@
<body id="index" class="home">
{% if GITHUB_URL %}
<a href="{{ GITHUB_URL }}"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a>
<a href="{{ GITHUB_URL }}"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a>
{% endif %}
<header id="banner" class="body">
@ -53,7 +53,7 @@
</ul>
</div><!-- /.blogroll -->
{% endif %}
{% if SOCIAL %}
{% if SOCIAL %}
<div class="social">
<h2>social</h2>
<ul>
@ -65,14 +65,15 @@
</div><!-- /.social -->
{% endif %}
</section><!-- /#extras -->
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://alexis.notmyidea.org/pelican/">pelican</a>, which takes great advantages of <a href="http://python.org">python</a>.
</address><!-- /#about -->
<p>The theme is by <a href="http://smashingmagazine.com">Smashing Magazine</a>, thanks!</p>
</footer><!-- /#contentinfo -->
{% include 'analytics.html' %}
</body>
</html>
</html>