Skip to content

Instantly share code, notes, and snippets.

@tanordheim
Created August 31, 2011 14:00
Show Gist options
  • Save tanordheim/1183602 to your computer and use it in GitHub Desktop.
Save tanordheim/1183602 to your computer and use it in GitHub Desktop.
{{ 'nyhetsarkiv' | node | assign_to: 'news_archive' }}
<div id='news'>
{% for post in news_archive.recent_posts limit:2 %}
<article>
<section class='article-image'>
<img src="{{ post.data.ingressbilde | resource | attribute: 'url' }}" alt="{{ post.name }}" />
</section>
<section class='article-content'>
<h2>{{ post.name }}</h2>
<p>{{ post.data.ingress | textilize }}</p>
<p class="read-more"><a href="/{{ post.uri }}">Les mer...</a></p>
</section>
</article>
{% endfor %}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment