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
  • Loading branch information
iBug committed Mar 27, 2020
1 parent c57dfd7 commit f34960f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
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
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

0 comments on commit f34960f

Please sign in to comment.