Skip to content

Instantly share code, notes, and snippets.

@msarit
Created February 15, 2021 22:18
Show Gist options
  • Save msarit/9d0f54b08c1716685c124397cb69f5b6 to your computer and use it in GitHub Desktop.
Save msarit/9d0f54b08c1716685c124397cb69f5b6 to your computer and use it in GitHub Desktop.
---
# front matter tells page to process Liquid
layout: default
author: Arit Amana
title: Arit's Jekyll Blog
background: '/assets/images/home-image.jpg'
---
<!-- Blog Post List -->
{% for post in site.posts limit : 5 %}
<article class="post-preview">
<a href="{{ post.url | prepend: site.baseurl | replace: '//', '/' }}">
<h2 class="post-title">{{ post.title }}</h2>
{% if post.intro %}
<h3 class="post-subtitle">{{ post.intro }}</h3>
{% else %}
<h3 class="post-subtitle">{{ post.excerpt | strip_html | truncatewords: 15 }}</h3>
{% endif %}
</a>
<p class="post-meta">
{{ post.date | date: '%B %d, %Y' }}
</p>
</article>
<hr>
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment