jekyll-auto-authors 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 793a2713c64a6ae7a275644ee7ee7220bfab67449be05787ac5e0d9ffbba2106
4
- data.tar.gz: 5a7686a785ed8f884b13b09b07bef2fb55e027b64c5187bf2ce25bc1690a4bab
3
+ metadata.gz: 34d5316f34ceb39a5fba1629185fac41dc6d4b5d637e7f28bce0e150dfb9e826
4
+ data.tar.gz: 04bc38e61fbe26f2c901d2833ab00b4acae73c51031e0bc2ebba4bd160cc7f28
5
5
  SHA512:
6
- metadata.gz: 10e376f3581c57032f8e8873bc6714c8eb8a5e709367f58a3d1d26444cf7d87e41c447c04f4076c78ecd614d5dd6aed6a0b9d3a27da0f5c6e9411110fe6a83e8
7
- data.tar.gz: e1fb701aa1878fa917aa5d029954f0276d51dfd9d7d59f06d9db9f39d5b722d38aa4fa8bda55747981bf57b8ffbd34a5f3ac02e6ea4c6c5ca32191cad6e8f807
6
+ metadata.gz: 36252906dfb352b93e82675c3bf137ada29347b2d33b88082ed26411b09a42e1fde523a1b8212f64c6e2936f1264285a22420667b76b4a9c3ddf5377b9ce6055
7
+ data.tar.gz: 6a6670867c18c4081cf7445effcf03fff51a308cb6c3c976673b6a866e6254e22ae095c05c27172112f6aeae67288af063afb3cdb3082733127c4d24e88973f6
@@ -10,8 +10,15 @@ module Jekyll
10
10
  # Construct the lambda function to set the config values this
11
11
  # function receives the pagination config hash and manipulates it.
12
12
  set_autopage_data_lambda = lambda do | in_config |
13
- author_data = YAML::load(File.read(autopage_config["data"]))
14
13
  in_config["author"] = author
14
+
15
+ if autopage_config["data"].nil?
16
+ return
17
+ end
18
+
19
+ # if a data file containing authors is not nil, transfer it to paginator object
20
+ # so that it can be used in the pagination template
21
+ author_data = YAML::load(File.read(autopage_config["data"]))
15
22
  in_config["author_data"] = author_data[author_name]
16
23
  end
17
24
 
@@ -31,11 +31,12 @@ module Jekyll
31
31
  # Lambda that created the author page for a given author.
32
32
  # will be passed to PaginateV2::Autopages for processing.
33
33
  createauthorpage_lambda = lambda do | autopage_author_config, pagination_config, layout_name, author, author_original_name |
34
- author_data = YAML::load(File.read(autopage_author_config["data"]))[author_original_name]
34
+ if !autopage_author_config["data"].nil?
35
+ author_data = YAML::load(File.read(autopage_author_config["data"]))[author_original_name]
35
36
 
36
- if author_data.nil?
37
- Jekyll.logger.warn "Author Pages:", "Author data for "#{author_original_name}" not found. Skipping author page..."
38
- return
37
+ if author_data.nil?
38
+ Jekyll.logger.warn "Author Pages:", "Author data for '#{author_original_name}' not found. Page will be generated without data."
39
+ end
39
40
  end
40
41
 
41
42
  site.pages << AuthorAutoPage.new(site, site.dest, autopage_author_config, pagination_config, layout_name, author, author_original_name)
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module AutoAuthors
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-auto-authors
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gourav Khunger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-24 00:00:00.000000000 Z
11
+ date: 2022-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll