Skip to content

Instantly share code, notes, and snippets.

View fenix011's full-sized avatar
🏠
Working from home

Librebits fenix011

🏠
Working from home
View GitHub Profile
@fenix011
fenix011 / output-articles-by-collection.liquid
Created April 12, 2021 16:10 — forked from nternetinspired/output-articles-by-collection.liquid
Loop through Jekyll collections and output their content as sections and articles
{% comment %}
Loops though every collection you defined in _config.yml and grabs the pages they contain; outputting title and full text with good basic html semantics.
Use page.excerpt instead of page.content to grab the first paragraph, blog list style. Markdownify is optional, depends how you authored content in your collections; I typically use Markdown.
{% endcomment % }
{% for collection in site.collections %}
{% assign name = collection.label %}
<section>