Add guide on applying Front Matter defaults to jekyll-archives pages (#2466)
* Add guide on applying Front Matter defaults to jekyll-archives pages
Sources:
- https://github.com/mmistakes/minimal-mistakes/issues/2465#issuecomment-604839346
- 8685c1ecd9
* Update CHANGELOG and history
This commit is contained in:
@@ -1029,6 +1029,30 @@ jekyll-archives:
|
||||
**Note:** The `archive-taxonomy` layout used by jekyll-archives is provided with the theme and can be found in the `_layouts` folder.
|
||||
{: .notice--info}
|
||||
|
||||
<div class="notice--success" markdown="1">
|
||||
|
||||
<h4 class="no_toc"><i class="fas fa-lightbulb"></i> Tip</h4>
|
||||
|
||||
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`.
|
||||
|
||||
For example, the following configuration enables author profile on tag archives and disables comments on category archives.
|
||||
|
||||
```yaml
|
||||
defaults:
|
||||
- scope:
|
||||
path: ""
|
||||
type: tag
|
||||
values:
|
||||
author_profile: true
|
||||
- scope:
|
||||
path: ""
|
||||
type: category
|
||||
values:
|
||||
comments: false
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
## HTML compression
|
||||
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user