Skip to content

Instantly share code, notes, and snippets.

@erap129
Created October 28, 2022 12:28
Show Gist options
  • Save erap129/2c8444a970b0722f81fb8964ffeb41d9 to your computer and use it in GitHub Desktop.
Save erap129/2c8444a970b0722f81fb8964ffeb41d9 to your computer and use it in GitHub Desktop.
Jekyll Blog HTML layout
---
layout: page
---
<ul class="posts-list list-unstyled" role="list">
{% for e in site.medium_posts_json %}
<li class="post-preview">
<a href="{{ e.link | absolute_url }}">
<h2 class="post-title">{{ e.title | strip_html }}</h2>
</a>
<p class="post-meta">
{% assign date_format = site.date_format | default: "%B %-d, %Y" %}
Posted on {{ e.date | date: date_format }}
</p>
<div class="post-image post-image-normal">
<a href="{{ e.link | absolute_url }}" aria-label="Thumbnail">
<img src="{{ e.image | absolute_url }}" alt="Post thumbnail">
</a>
</div>
<div class="post-entry">
{% assign excerpt_length = site.excerpt_length | default: 50 %}
{{ e.description | truncatewords: excerpt_length }}
<a href="{{ e.link | absolute_url }}" class="post-read-more">[Read&nbsp;More]</a>
</div>
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment