Skip to content

Instantly share code, notes, and snippets.

@erjjones
Created September 5, 2012 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erjjones/3639558 to your computer and use it in GitHub Desktop.
Save erjjones/3639558 to your computer and use it in GitHub Desktop.
Get First Post Ruby
{% assign first_post = site.posts.first %}
{{ first_post.title }}
{{ first_post.date | date: "%B %e, %Y" }}
{{ first_post.summary }}
{% for post in site.posts offset: 1 limit: 50 %}
{{ post.title }}
{{ post.date | date: "%B %e, %Y" }}
{% for tag in post.tags %}
{{ tag }}
{% if forloop.last != true %}
{% endif %}
{% endfor %}
{{ post.category }}
{{ post.summary }}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment