diff --git a/README.md b/README.md index bd76cab..f14cd70 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,7 @@ autopages: authors: enabled: true data: '_data/authors.yml' # Data file with the author details + exclude: [ "author1", "author2" ] # Force exclude certain authors from autopage generation layouts: - 'author.html' # We'll define this layout later title: 'Posts by :author' @@ -133,6 +134,15 @@ username2: twitter: '@user2' github: 'user2' +test: + exclude: true # Skips author from autopage generation only if they have no post assigned. + name: 'Test user' + bio: 'Bio of test user' + website: 'http://test.com' + socials: + twitter: '@test' + github: 'test' + # and so on ``` diff --git a/example/Gemfile.lock b/example/Gemfile.lock index 10ae867..e0194ac 100644 --- a/example/Gemfile.lock +++ b/example/Gemfile.lock @@ -10,7 +10,7 @@ GIT GEM remote: https://rubygems.org/ specs: - addressable (2.8.1) + addressable (2.8.4) public_suffix (>= 2.0.2, < 6.0) colorator (1.1.0) concurrent-ruby (1.2.2) @@ -20,9 +20,9 @@ GEM eventmachine (1.2.7) ffi (1.15.5) forwardable-extended (2.6.0) - google-protobuf (3.22.2-arm64-darwin) + google-protobuf (3.23.0-arm64-darwin) http_parser.rb (0.8.0) - i18n (1.12.0) + i18n (1.13.0) concurrent-ruby (~> 1.0) jekyll (4.3.2) addressable (~> 2.4) @@ -40,7 +40,7 @@ GEM safe_yaml (~> 1.0) terminal-table (>= 1.8, < 4.0) webrick (~> 1.7) - jekyll-auto-authors (1.0.2) + jekyll-auto-authors (1.0.3) jekyll (>= 3.0.0) jekyll-paginate-v2 (>= 3.0.0) jekyll-feed (0.17.0) @@ -71,7 +71,7 @@ GEM rexml (3.2.5) rouge (4.1.0) safe_yaml (1.0.5) - sass-embedded (1.60.0-arm64-darwin) + sass-embedded (1.62.1-arm64-darwin) google-protobuf (~> 3.21) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) @@ -91,4 +91,4 @@ DEPENDENCIES webrick BUNDLED WITH - 2.3.23 + 2.4.8 diff --git a/example/_config.yml b/example/_config.yml index 6d52a72..9c61549 100644 --- a/example/_config.yml +++ b/example/_config.yml @@ -48,6 +48,7 @@ autopages: authors: enabled: true data: '_data/authors.yml' # Data file with the author details + exclude: ["test2", "abc"] # Force skip autopages for author even if they have posts assigned layouts: - 'author.html' # We'll define this layout later title: 'Posts by :author' diff --git a/example/_data/authors.yml b/example/_data/authors.yml index 8504d6c..9cb8c6a 100644 --- a/example/_data/authors.yml +++ b/example/_data/authors.yml @@ -13,3 +13,21 @@ janedoe: socials: github: "jane-doe" twitter: "jane_doe" + +test1: + exclude: true # testing the exclude attribute + name: "test1" + bio: "Test is a demo author 1" + email: "test1@test.com" + socials: + github: "test1" + twitter: "test1" + +# test2 is excluded via exclude attribute for authors autopage config in _config.yml +test2: + name: "test2" + bio: "Test is a demo author 2" + email: "test2@test.com" + socials: + github: "test2" + twitter: "test2" diff --git a/example/_includes/header.html b/example/_includes/header.html index b880f5b..401364e 100644 --- a/example/_includes/header.html +++ b/example/_includes/header.html @@ -19,7 +19,11 @@