Skip to content

Instantly share code, notes, and snippets.

@toanalien
Created November 8, 2015 16:26
Show Gist options
  • Save toanalien/050c56c4cd53eec3dfa1 to your computer and use it in GitHub Desktop.
Save toanalien/050c56c4cd53eec3dfa1 to your computer and use it in GitHub Desktop.
{% for post in site.posts limit:10 %}
<div class="post-preview">
<h2><a href="{{ post.url }}">{{ post.title }}</a></h2>
<div class="post-date">{{ post.date | date: "%B %d, %Y" }}</div>
{{ post.content | split:'<!--break-->' | first }}
{% if post.content contains '<!--break-->' %}
<a href="{{ post.url }}">read more</a>
{% endif %}
</div>
<hr>
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment