Skip to content

Instantly share code, notes, and snippets.

@davidpots
Last active August 29, 2015 14:13
Show Gist options
  • Save davidpots/e4cd303837dc958aa036 to your computer and use it in GitHub Desktop.
Save davidpots/e4cd303837dc958aa036 to your computer and use it in GitHub Desktop.
Jekyll loop notes
{% if podcast.tags %}
<ul>
{% for tag in podcast.tags %}
<li>{{ tag }}</li>
{% endfor %}
</ul>
{% endif %}
<ul>
{% for podcast in site.podcasts %}
{% if podcast.tags contains 'funk' %}
<li>{{ podcast.title }}</li>
{% endif %}
{% endfor %}
</ul>
{% assign sorted_songs = site.pages | sort: 'date' %}
{% for page in sorted_songs reversed %}
{% if page.categories contains 'song' %}
<div class="item">
<a href="{{ site.baseurl }}{{ page.url }}">{{page.song_name}}</a>
</div>
{% endif %}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment