Skip to content

Commit

Permalink
Use include documents-collection.html in home layout
Browse files Browse the repository at this point in the history
  • Loading branch information
iBug committed Sep 17, 2024
1 parent 7d212bc commit 075fad7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions _includes/documents-collection.html
Original file line number Diff line number Diff line change
@@ -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 %}
Expand All @@ -9,5 +9,5 @@
{% endif %}

{%- for post in entries -%}
{% include archive-single.html %}
{% include archive-single.html type=include.type %}
{%- endfor -%}
4 changes: 1 addition & 3 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ <h3 class="archive__subtitle">{{ site.data.ui-text[site.locale].recent_posts | d

{% 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 %}
3 changes: 2 additions & 1 deletion docs/_docs/18-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---

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

Expand Down

0 comments on commit 075fad7

Please sign in to comment.