mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
- Added configurable Google analytics template
(GOOGLE_ANALYTICS='UA-XXXX-YYYY' in your settings file)
This commit is contained in:
parent
32102dae12
commit
caacf48848
2 changed files with 19 additions and 7 deletions
11
pelican/themes/notmyidea/templates/analytics.html
Normal file
11
pelican/themes/notmyidea/templates/analytics.html
Normal 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 %}
|
||||||
|
|
@ -9,11 +9,11 @@
|
||||||
|
|
||||||
<!--[if IE]>
|
<!--[if IE]>
|
||||||
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
||||||
|
|
||||||
<!--[if lte IE 7]>
|
<!--[if lte IE 7]>
|
||||||
<link rel="stylesheet" type="text/css" media="all" href="{{ SITEURL }}/css/ie.css"/>
|
<link rel="stylesheet" type="text/css" media="all" href="{{ SITEURL }}/css/ie.css"/>
|
||||||
<script src="{{ SITEURL }}/js/IE8.js" type="text/javascript"></script><![endif]-->
|
<script src="{{ SITEURL }}/js/IE8.js" type="text/javascript"></script><![endif]-->
|
||||||
|
|
||||||
<!--[if lt IE 7]>
|
<!--[if lt IE 7]>
|
||||||
<link rel="stylesheet" type="text/css" media="all" href="{{ SITEURL }}/css/ie6.css"/><![endif]-->
|
<link rel="stylesheet" type="text/css" media="all" href="{{ SITEURL }}/css/ie6.css"/><![endif]-->
|
||||||
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
<body id="index" class="home">
|
<body id="index" class="home">
|
||||||
{% if GITHUB_URL %}
|
{% 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 %}
|
{% endif %}
|
||||||
|
|
||||||
<header id="banner" class="body">
|
<header id="banner" class="body">
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div><!-- /.blogroll -->
|
</div><!-- /.blogroll -->
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if SOCIAL %}
|
{% if SOCIAL %}
|
||||||
<div class="social">
|
<div class="social">
|
||||||
<h2>social</h2>
|
<h2>social</h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -65,14 +65,15 @@
|
||||||
</div><!-- /.social -->
|
</div><!-- /.social -->
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</section><!-- /#extras -->
|
</section><!-- /#extras -->
|
||||||
|
|
||||||
<footer id="contentinfo" class="body">
|
<footer id="contentinfo" class="body">
|
||||||
<address id="about" class="vcard 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>.
|
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 -->
|
</address><!-- /#about -->
|
||||||
|
|
||||||
<p>The theme is by <a href="http://smashingmagazine.com">Smashing Magazine</a>, thanks!</p>
|
<p>The theme is by <a href="http://smashingmagazine.com">Smashing Magazine</a>, thanks!</p>
|
||||||
</footer><!-- /#contentinfo -->
|
</footer><!-- /#contentinfo -->
|
||||||
|
|
||||||
|
{% include 'analytics.html' %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue