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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34d5316f34ceb39a5fba1629185fac41dc6d4b5d637e7f28bce0e150dfb9e826
|
4
|
+
data.tar.gz: 04bc38e61fbe26f2c901d2833ab00b4acae73c51031e0bc2ebba4bd160cc7f28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
34
|
+
if !autopage_author_config["data"].nil?
|
35
|
+
author_data = YAML::load(File.read(autopage_author_config["data"]))[author_original_name]
|
35
36
|
|
36
|
-
|
37
|
-
|
38
|
-
|
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)
|
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.
|
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-
|
11
|
+
date: 2022-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|