Skip to content

Instantly share code, notes, and snippets.

@Phlow
Last active March 10, 2022 12:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Phlow/6ea72323477b949602510eb0a6e97244 to your computer and use it in GitHub Desktop.
Save Phlow/6ea72323477b949602510eb0a6e97244 to your computer and use it in GitHub Desktop.
This Liquid loop for Jekyll loops through a defined category of your choice. Use this code-snippet as an include
{% comment %}
*
* This loop loops through a category of your choice and lists
* all entries. To address the category of your linking use the
* include like this:
*
* {% include loop-category category='webdesign' %}
*
{% endcomment %}
{% for entry in site.categories[include.category] %}
<li><a href="{{ site.url }}{{ site.baseurl }}{{ entry.url }}" title="{{ entry.title | escape }}">{{ entry.title }}</a></li>{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment