From 54001dade76de5a016ab6ae1df15f66626319709 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?iBug=20=E2=99=A6?= <git@ibugone.com>
Date: Tue, 31 Mar 2020 04:17:45 +0800
Subject: [PATCH] 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
- https://github.com/iBug/iBug-source/commit/8685c1ecd984529dcb044ba816497313d8896f1e

* Update CHANGELOG and history
---
 .gitignore                     |  2 +-
 CHANGELOG.md                   |  1 +
 docs/_docs/05-configuration.md | 24 ++++++++++++++++++++++++
 docs/_docs/18-history.md       |  3 ++-
 4 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index a3ad00c5..5c5a91f8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,7 +10,7 @@
 *.gem
 .bundle
 Gemfile.lock
-vendor/bundle
+**/vendor/bundle
 
 # Node.js and NPM
 node_modules
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 63aca921..28140d2e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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)
 
diff --git a/docs/_docs/05-configuration.md b/docs/_docs/05-configuration.md
index 1ea73ed6..f6cbb0d3 100644
--- a/docs/_docs/05-configuration.md
+++ b/docs/_docs/05-configuration.md
@@ -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.
diff --git a/docs/_docs/18-history.md b/docs/_docs/18-history.md
index da83fcf3..589a9fce 100644
--- a/docs/_docs/18-history.md
+++ b/docs/_docs/18-history.md
@@ -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
 ---
 
@@ -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)