Use include documents-collection.html in home layout

This commit is contained in:
iBug 2024-09-17 16:37:55 +08:00
parent 7d212bc310
commit 075fad74cb
4 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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 -%}

View File

@ -14,9 +14,7 @@ layout: archive
{% assign entries_layout = page.entries_layout | default: 'list' %}
<div class="entries-{{ entries_layout }}">
{% for post in posts %}
{% include archive-single.html type=entries_layout %}
{% endfor %}
{% include documents-collection.html entries=posts type=entries_layout %}
</div>
{% include paginator.html %}

View File

@ -5,7 +5,7 @@ permalink: "/docs/history/"
excerpt: Change log of enhancements and bug fixes made to the theme.
sidebar:
nav: docs
last_modified_at: '2024-08-20T17:04:07+08:00'
last_modified_at: '2024-09-17T16:37:54+08:00'
toc: false
---
@ -25,6 +25,7 @@ toc: false
- Remove unnecessary "type" attribute [#4956](https://github.com/mmistakes/minimal-mistakes/issues/4956)
- The "if" means the default is never used [#4955](https://github.com/mmistakes/minimal-mistakes/issues/4955)
- For pages without a title, show the site title only once [#4959](https://github.com/mmistakes/minimal-mistakes/issues/4959)
- Use `documents-collection.html` partial in `home` layout.
### Bug Fixes