jekyll-authors 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/jekyll-authors.rb +4 -5
- data/lib/jekyll-authors/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c73f67b55705106d4c373c494600845a91751b8
|
4
|
+
data.tar.gz: f6af24c9c746df01f0e615659356f747a20cd490
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa019f58b66891bf0f3abea129e63591721c8441fd579aff7353afbeba5bdd5370a46f0fa728eb5aef9a99fedea8d06c957a708df4909b27d7f22c5b401dd6c6
|
7
|
+
data.tar.gz: 81f4b6ad80806724e09b20025e18d7018744900c21d6463eeb7a0d47ad0044d0acc87e01dbf6cc99965871df5039a3ab147074670feecf2bea99b3fcd5f38a4a
|
data/Gemfile.lock
CHANGED
data/lib/jekyll-authors.rb
CHANGED
@@ -12,7 +12,6 @@ module Jekyll
|
|
12
12
|
self.process(@name)
|
13
13
|
self.read_yaml(File.join(base, '_layouts'), 'author_index.html')
|
14
14
|
self.data['author'] = author
|
15
|
-
|
16
15
|
author_title_prefix = site.config['author_title_prefix'] || 'Author: '
|
17
16
|
self.data['title'] = "#{author_title_prefix}#{author}"
|
18
17
|
end
|
@@ -53,26 +52,26 @@ module Jekyll
|
|
53
52
|
def generate(site)
|
54
53
|
if site.layouts.key? 'author_index'
|
55
54
|
dir = site.config['author_dir'] || 'authors'
|
56
|
-
site.authors.keys.each do |author|
|
55
|
+
site.config['authors'].keys.each do |author|
|
57
56
|
write_author_index(site, File.join(dir, author.gsub(/\s/, "-").gsub(/[^\w-]/, '').downcase), author)
|
58
57
|
end
|
59
58
|
end
|
60
59
|
|
61
60
|
if site.layouts.key? 'author_feed'
|
62
61
|
dir = site.config['author_dir'] || 'authors'
|
63
|
-
site.authors.keys.each do |author|
|
62
|
+
site.config['authors'].keys.each do |author|
|
64
63
|
write_author_feed(site, File.join(dir, author.gsub(/\s/, "-").gsub(/[^\w-]/, '').downcase), author)
|
65
64
|
end
|
66
65
|
end
|
67
66
|
|
68
67
|
if site.layouts.key? 'author_list'
|
69
68
|
dir = site.config['author_dir'] || 'authors'
|
70
|
-
write_author_list(site, dir, site.authors.keys.sort)
|
69
|
+
write_author_list(site, dir, site.config['authors'].keys.sort)
|
71
70
|
end
|
72
71
|
end
|
73
72
|
|
74
73
|
def write_author_index(site, dir, author)
|
75
|
-
index =
|
74
|
+
index = AuthorIndex.new(site, site.source, dir, author)
|
76
75
|
index.render(site.layouts, site.site_payload)
|
77
76
|
index.write(site.dest)
|
78
77
|
site.static_files << index
|