Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save wvuwebgist/71023ca0e028f9bc879263ac8e64cb97 to your computer and use it in GitHub Desktop.
Save wvuwebgist/71023ca0e028f9bc879263ac8e64cb97 to your computer and use it in GitHub Desktop.
CleanSlate: Pull a feed from your blog while excluding certain labels in Liquid.
{% assign blog = site | get_page: 1234 %} <!-- Change this ID to your blog_index page's ID -->
{% assign articles = blog.articles | filter_articles: tags: "dont-show-stuff-with-this-label", tags_match: "none", limit: 5 %}
{% if articles.length > 0 %}
<ul>
{% for article in articles.all %}
<li><a href="{{ article.url }}">{{ article.name }}</a></li>
{% endfor %}
</ul>
{% else %}
<p>No blog posts found. Try again later, perhaps?</p>
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment