Skip to content

Instantly share code, notes, and snippets.

@su-narthur
Created November 7, 2017 19:20
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 su-narthur/f01b0ed8005c9913c5c16498ce669f82 to your computer and use it in GitHub Desktop.
Save su-narthur/f01b0ed8005c9913c5c16498ce669f82 to your computer and use it in GitHub Desktop.
<div class="container" style="max-width:100%;padding:0;">
<div class="row">
{% for i, post in su.page("/my-blog").posts|reverse|slice(0,4) %}
<div class="col-md-6">
{% if i == 0 %}<img data-cke-saved-src="{{ post.featuredImage.ratio(315, 215) }}" src="{{ post.featuredImage.ratio(315, 215) }}" style="margin-bottom: 20px;">{% endif %}
<h4><a data-cke-saved-href="{{ su.page.url }}" href="{{ su.page.url }}">{{ post.title }}</a></h4>
<p>{{ post.description ?: post.content|striptags|pretty_truncate(200) }}</p>
</div>
{% endfor %}
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment