Skip to content

Instantly share code, notes, and snippets.

@newbamboo
Created February 19, 2009 22:43
Show Gist options
  • Save newbamboo/67168 to your computer and use it in GitHub Desktop.
Save newbamboo/67168 to your computer and use it in GitHub Desktop.
Index page template for our Jekyll blog
---
layout: default
title: Ruby on Rails development
---
{% for post in site.latest_posts %}
<div class="entry">
<div class="entrytitle">
<h2><a href="{{ post.url }}">{{ post.title }}</a> <span class="author">{{ post.author }}</span></h2>
<h3>{{ post.date | date_to_string }} | <a href="{{ post.url }}#disqus_thread" class="commentslink">View comments</a></h3>
</div>
<div class="entrybody">
{{ post.content }}
</div>
<div class="entrymeta">
<a href="{{ post.url }}#disqus_thread" class="commentslink">View comments</a>
</div>
</div>
{% endfor %}
{% for post in site.older_posts %}
<div class="entry old_entry">
<div class="entrytitle">
<h2><a href="{{ post.url }}">{{ post.title }}</a> <span class="author">{{ post.author }}</span></h2>
<h3>{{ post.date | date_to_string }} | <a href="{{ post.url }}#disqus_thread" class="commentslink">View comments</a></h3>
</div>
</div>
{% endfor %}
<div class="archive_link">
<a href="/archive">View all previous posts in archive &raquo;</a>
</div>
<script type="text/javascript">
//<![CDATA[
(function() {
var links = document.getElementsByTagName('a');
var query = '?';
for(var i = 0; i < links.length; i++) {
if(links[i].href.indexOf('#disqus_thread') >= 0) {
query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
}
}
document.write('<script charset="utf-8" type="text/javascript" src="http://disqus.com/forums/newbambblog/get_num_replies.js' + query + '"></' + 'script>');
})();
//]]>
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment