Skip to content

Instantly share code, notes, and snippets.

@dogukancagatay
Created January 23, 2013 16:33
Show Gist options
  • Save dogukancagatay/4609301 to your computer and use it in GitHub Desktop.
Save dogukancagatay/4609301 to your computer and use it in GitHub Desktop.
Showing latest posts on the index (or whatever) page on a Jekyll Bootstrap system. Simply add latest_posts.html to _includes/JB/ and copy the code on index.md file where you want to add the posts.

{% for post in site.posts limit:5 %} {% include JB/latest_posts.html %} {% endfor %}

<div class="row">
<div class="span10">
<h3><a href="{{ BASE_PATH }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a> <small>{{ post.date | date_to_long_string }}</small></h3>
<hr>
{{ post.content }}
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment