Browse files

Put Google Analytics in an include.

  • Loading branch information...
1 parent c6b4b2a commit f83c10e3a56406c9ae57994adf169a1f470dcd0b @johanbrook committed Apr 7, 2011
View
3 _config.yml
@@ -1,8 +1,9 @@
+base_url: http://johanbrook.com
auto: true
markdown: rdiscount
rdiscount:
extensions: [smart]
pygments: true
-permalink: /posts/:title
+permalink: /:categories/:title
post_types:
- work
View
10 _includes/analytics.html
@@ -0,0 +1,10 @@
+<script>
+ var _gaq = [['_setAccount', 'UA-4471592-8'], ['_trackPageview']];
+ (function(d, t) {
+ var g = d.createElement(t),
+ s = d.getElementsByTagName(t)[0];
+ g.async = 1;
+ g.src = '//www.google-analytics.com/ga.js';
+ s.parentNode.insertBefore(g, s);
+ }(document, 'script'));
+</script>
View
19 _includes/sidebar.html
@@ -1,6 +1,6 @@
<div class="sidebar">
<section id="latestposts" class="node">
- <h2>Latest posts</h2>
+ <h2>Recent</h2>
<ol class="list">
{% for post in site.posts %}
@@ -14,6 +14,23 @@
</ol>
</section>
+ <section id="categories" class="node">
+ <h2>Topics</h2>
+ <ol class="list">
+ {% for category in site.iterable.categories %}
+
+ {% if category.posts.size > 1 %}
+ <li>
+ <a href="/categories/{{ category.name }}">{{ category.name }}
+ <span class="listdetail">{{ category.posts | size }} posts</span>
+ </a>
+ </li>
+ {% endif %}
+
+ {% endfor %}
+ </ol>
+ </section>
+
<section class="node">
<h2>$ whoami</h2>
<p>I'm Johan, a boy man of many talents. I love building things. I freelance as web designer and developer, working with big and small clients. </p>
View
2 _layouts/category_list.html
@@ -3,6 +3,8 @@
title: Categories
---
+<h1>{{ page.title }}</h1>
+
<ul>
{% for category in page.categories %}
<li><a href="/categories/{{ category | replace:' ', '-' | downcase }}">{{ category }}</a></li>
View
10 _layouts/master.html
@@ -32,7 +32,7 @@
<!-- The Viewport. Be sure to double-check on the actual device. -->
<meta name="viewport" content="width=device-width, initial-scale=1" />
-
+
<!--[if IE]>
<link rel="stylesheet" href="/static/css/patches/win-ie-all.css" media="all" />
@@ -57,8 +57,8 @@
<nav role="navigation">
<ul>
<li><a href="/work">Work</a></li>
- <li><a href="#">Archive</a></li>
- <li><a href="#">About</a></li>
+ <li><a href="/archive">Archive</a></li>
+ <li><a href="/about">About</a></li>
</ul>
</nav>
</header>
@@ -69,10 +69,8 @@
</section>
- {{ include footer.html }}
-
+ {% include footer.html %}
-<!-- Google Analytics -->
<!-- Javascripts -->
<script src="/static/js/jquery-1.5.1.min.js"></script>
View
2 _posts/2011-04-07-a-markdown-teleprompter.markdown
@@ -2,7 +2,7 @@
title: A markdown teleprompter
layout: post
date: 2010-10-10
-category: Minimalism
+category: minimalism
link: http://brettterpstra.com/promptdown-markdown-teleprompter/
source: Macstories
sourcelink: http://www.macstories.net/links/a-markdown-teleprompter
View
2 _posts/2011-04-07-after-hours.markdown
@@ -1,7 +1,7 @@
---
title: After Hours
layout: post
-category: Habits
+category: habits
date: 2011-01-13
---
View
2 _posts/2011-04-07-interview-with-david-heinemeier-hansson.markdown
@@ -1,7 +1,7 @@
---
title: Interview with David Heinemeier Hansson
layout: post
-category: Interviews
+category: interviews
date: 2010-10-10
link: http://bigthink.com/ideas/21596
---
View
2 index.html
@@ -4,7 +4,7 @@
---
-<section id="content">
+<section id="content">
{% for post in site.posts %}

0 comments on commit f83c10e

Please sign in to comment.