Created
March 4, 2021 23:18
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% 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