-
-
Save kousherAlam/fb1ed3bb7f7361392a3728a971e3da85 to your computer and use it in GitHub Desktop.
An example of a blog post loop in Jekyll.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for post in site.posts %} | |
<article class="{% if forloop.first %}first{% elsif forloop.last %}last{% else %}middle{% endif %}"> | |
<div class="article-head"> | |
<h2 class="title"><a href="/{{ post.url }}/" class="js-pjax">{{ post.title }}</a></h2> | |
<p class="date">{{ post.date | date: "%b %d, %Y" }}</p> | |
</div><!--/.article-head--> | |
<div class="article-content"> | |
{{ post.long_description }} | |
<a href="/{{ post.url }}/" class="full-post-link js-pjax">Read more</a> | |
</div><!--/.article-content--> | |
</article> | |
{% if forloop.last %}{% else %}<div class="separater"></div>{% endif %} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment