Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Layout that lists named collection when compiled to HTML
Collection Home is an open-source Jekyll layout, distributed as a Git submodule, that automatically builds a listing page for any named Jekyll collection when the site compiles to HTML.
Collection Home is a Liquid templating layout for Jekyll sites, released by the liquid-utilities organization under the GNU Affero General Public License v3.0. It accepts a collection_name value from page FrontMatter and renders an HTML list of every document in that collection, placing any Markdown content written on the listing page above the generated links. The entire implementation lives in one file, collection-home.html, and is installed via a Git submodule so it can be version-pinned per project.
git submodule add -b master --name collection-home https://github.com/liquid-utilities/collection-home.git _layouts/modules/collection-home, then update with git submodule update --init --merge --recursive.collection_name and list_title in a page's FrontMatter and the layout knows which collection to list and what heading to use.posts_sort_by (a FrontMatter key name) and posts_reverse: true to control the ordering.your_collection.md, not only from inside the collection folder.collection_name to a posts collection and add list_title to display a header above each post's link.docs.md page with the layout pointing at a docs collection, with each doc's FrontMatter supplying its title, date, and description.posts_sort_by: date and posts_reverse: true to show the newest collection entries first.Setting it up requires adding the submodule, creating a page with layout: modules/collection-home/collection-home and a collection_name, then pushing the changes. Each collection page should include standard FrontMatter like layout, title, date, and description; the date display depends on the site's timezone setting in _config.yml.
The layout is written to run without edits if the site uses Minima, Jekyll's default theme. For other themes, you may need to adjust the SVG icon line that references minima-social-icons.svg; auto-detection for GitHub Pages themes may arrive in a future release.
Use the Git submodule command: git submodule add -b master --name collection-home https://github.com/liquid-utilities/collection-home.git _layouts/modules/collection-home. Then commit the .gitmodules file and the submodule directory, and clone with --recurse-submodules to get a complete checkout.
Yes. Version 0.0.3 and later let you set posts_sort_by to any FrontMatter key, and add posts_reverse: true to invert the order. Without these, the layout uses the default collection order.
Jekyll defaults to a 0000 timezone offset when timezone is not set in _config.yml, which recalculates both the day and the hour. Setting a value like America/Los_Angeles prevents that offset from altering collection page dates.
