Skip to content

Commit

Permalink
Add guide on applying Front Matter defaults to jekyll-archives pages …
Browse files Browse the repository at this point in the history
…(#2466)

* Add guide on applying Front Matter defaults to jekyll-archives pages

Sources:
- mmistakes/minimal-mistakes#2465 (comment)
- iBug/iBug-source@8685c1e

* Update CHANGELOG and history
  • Loading branch information
iBug authored Mar 30, 2020
1 parent f86303a commit 1d5c4f0
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*.gem
.bundle
Gemfile.lock
vendor/bundle
**/vendor/bundle

# Node.js and NPM
node_modules
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

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

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

Expand Down
24 changes: 24 additions & 0 deletions docs/_docs/05-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
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: 2020-03-23T14:04:34-04:00
last_modified_at: 2020-03-27T15:04:39+08:00
toc: false
---

Expand All @@ -15,6 +15,7 @@ toc: false

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

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

Expand Down

0 comments on commit 1d5c4f0

Please sign in to comment.