diff --git a/CHANGELOG.md b/CHANGELOG.md index 0956219c..65ac79b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Remove unnecessary "type" attribute (#4956) - The "if" means the default is never used (#4955) - For pages without a title, show the site title only once (#4959) +- Use `documents-collection.html` partial in `home` layout. ### Bug Fixes diff --git a/_includes/documents-collection.html b/_includes/documents-collection.html index bb19bfb6..8c1d1279 100644 --- a/_includes/documents-collection.html +++ b/_includes/documents-collection.html @@ -1,4 +1,4 @@ -{% assign entries = site[include.collection] | where_exp: "post", "post.hidden != true" %} +{% assign entries = include.entries | default: site[include.collection] | where_exp: "post", "post.hidden != true" %} {% if include.sort_by %} {% assign entries = entries | sort: include.sort_by %} @@ -9,5 +9,5 @@ {% endif %} {%- for post in entries -%} - {% include archive-single.html %} + {% include archive-single.html type=include.type %} {%- endfor -%} diff --git a/_layouts/home.html b/_layouts/home.html index 02e96eb8..384a4d9a 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -14,9 +14,7 @@ layout: archive {% assign entries_layout = page.entries_layout | default: 'list' %}