Skip to content

Commit

Permalink
fix: fallback value unused when exclude block is missing from config
Browse files Browse the repository at this point in the history
release: v1.0.4
  • Loading branch information
gouravkhunger committed May 11, 2023
1 parent 34481da commit 12b2f03
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ autopages:
authors:
enabled: true
data: '_data/authors.yml' # Data file with the author details
exclude: [ "author1", "author2" ] # Force exclude certain authors from autopage generation
# Uncomment the line below to force exclude certain authors from autopage generation.
# exclude: [ "author1", "author2" ]
layouts:
- 'author.html' # We'll define this layout later
title: 'Posts by :author'
Expand Down
3 changes: 2 additions & 1 deletion example/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ GEM
safe_yaml (~> 1.0)
terminal-table (>= 1.8, < 4.0)
webrick (~> 1.7)
jekyll-auto-authors (1.0.3)
jekyll-auto-authors (1.0.4)
jekyll (>= 3.0.0)
jekyll-paginate-v2 (>= 3.0.0)
jekyll-feed (0.17.0)
Expand Down Expand Up @@ -80,6 +80,7 @@ GEM

PLATFORMS
arm64-darwin-21
arm64-darwin-22

DEPENDENCIES
jekyll
Expand Down
3 changes: 3 additions & 0 deletions lib/jekyll-auto-authors/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ def generate(site)
autopage_config = Jekyll::Utils.deep_merge_hashes(PaginateV2::AutoPages::DEFAULT, site.config["autopages"] || {})
pagination_config = Jekyll::Utils.deep_merge_hashes(PaginateV2::Generator::DEFAULT, site.config["pagination"] || {})

# Hack for exclude logic to be used later
autopage_config["authors"]["exclude"] ||= []

# load the configs for jekyll-auto-authors (this plugin).
authors_config = Jekyll::Utils.deep_merge_hashes(DEFAULT, site.config["autopages"]["authors"] || {})

Expand Down
2 changes: 1 addition & 1 deletion lib/jekyll-auto-authors/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Jekyll
module AutoAuthors
VERSION = "1.0.3"
VERSION = "1.0.4"
end
end

0 comments on commit 12b2f03

Please sign in to comment.