Skip to content

Commit 54001da

Browse files
authoredMar 30, 2020
Add guide on applying Front Matter defaults to jekyll-archives pages (mmistakes#2466)
* Add guide on applying Front Matter defaults to jekyll-archives pages Sources: - mmistakes#2465 (comment) - iBug/iBug-source@8685c1e * Update CHANGELOG and history
1 parent 843c38b commit 54001da

File tree

4 files changed

+28
-2
lines changed

4 files changed

+28
-2
lines changed
 

‎.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*.gem
1111
.bundle
1212
Gemfile.lock
13-
vendor/bundle
13+
**/vendor/bundle
1414

1515
# Node.js and NPM
1616
node_modules

‎CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- Fix Finnish ocalized UI text strings. [#2455](https://github.com/mmistakes/minimal-mistakes/pull/2455)
66
- Clarify documentation that Lunr only searches documents in collections. [#2450](https://github.com/mmistakes/minimal-mistakes/pull/2450)
7+
- Add guide on applying Front Matter defaults to jekyll-archives pages [#2466](https://github.com/mmistakes/minimal-mistakes/pull/2466)
78

89
## [4.19.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.19.1)
910

‎docs/_docs/05-configuration.md

+24
Original file line numberDiff line numberDiff line change
@@ -1029,6 +1029,30 @@ jekyll-archives:
10291029
**Note:** The `archive-taxonomy` layout used by jekyll-archives is provided with the theme and can be found in the `_layouts` folder.
10301030
{: .notice--info}
10311031

1032+
<div class="notice--success" markdown="1">
1033+
1034+
<h4 class="no_toc"><i class="fas fa-lightbulb"></i> Tip</h4>
1035+
1036+
To apply [Front Matter defaults](https://jekyllrb.com/docs/configuration/front-matter-defaults/) to pages generated by the `jekyll-archives` plugin, you can specify a scope of an empty `path` and a `type` of either `tag` or `category`.
1037+
1038+
For example, the following configuration enables author profile on tag archives and disables comments on category archives.
1039+
1040+
```yaml
1041+
defaults:
1042+
- scope:
1043+
path: ""
1044+
type: tag
1045+
values:
1046+
author_profile: true
1047+
- scope:
1048+
path: ""
1049+
type: category
1050+
values:
1051+
comments: false
1052+
```
1053+
1054+
</div>
1055+
10321056
## HTML compression
10331057

10341058
If you care at all about performance (and really who doesn't) compressing the HTML files generated by Jekyll is a good thing to do.

‎docs/_docs/18-history.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ permalink: /docs/history/
55
excerpt: "Change log of enhancements and bug fixes made to the theme."
66
sidebar:
77
nav: docs
8-
last_modified_at: 2020-03-23T14:04:34-04:00
8+
last_modified_at: 2020-03-27T15:04:39+08:00
99
toc: false
1010
---
1111

@@ -15,6 +15,7 @@ toc: false
1515

1616
- Fix Finnish ocalized UI text strings. [#2455](https://github.com/mmistakes/minimal-mistakes/pull/2455)
1717
- Clarify documentation that Lunr only searches documents in collections. [#2450](https://github.com/mmistakes/minimal-mistakes/pull/2450)
18+
- Add guide on applying Front Matter defaults to jekyll-archives pages [#2466](https://github.com/mmistakes/minimal-mistakes/pull/2466)
1819

1920
## [4.19.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.19.1)
2021

0 commit comments

Comments
 (0)
Please sign in to comment.