jekyll-author-pages 1.0.2 → 1.0.3
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 +4 -4
- data/README.md +1 -1
- data/lib/jekyll/author.rb +13 -11
- data/lib/jekyll/plugin_version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd78fff8610efe249b515a879a666c2c101f93b6
|
4
|
+
data.tar.gz: 83177dbe70a2380a5c7d613716c530e48399afc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b484c27cf0201afba107eee0b92394ce4a62d14e751388e96d9a8ad4f2f351536393fe0c79516907a6d4f86cb13ec8f1b9e7a522d68802a9d6d9e6f01672e179
|
7
|
+
data.tar.gz: d109608b369a7babd503c07ee7ba96ec950b24fb9c4b1a90b1c6d8eec7c85df9ee5ed8e08132d919ae8e9726f616db4b566eea4ee973b81a88435f21e415d947
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Jekyll Author [](https://gitlab.com/SaiLabs/Jekyll-Author-Pages/commits/master) [](https://badge.fury.io/rb/jekyll-author-pages)
|
2
2
|
|
3
3
|
This plugin helps generate Author based pages for Jekyll static site.
|
4
4
|
|
data/lib/jekyll/author.rb
CHANGED
@@ -23,19 +23,21 @@ module JekyllPlugins
|
|
23
23
|
puts "Generating Author Pages"
|
24
24
|
dir = site.config['authors_dir'] || 'authors'
|
25
25
|
puts "Authors pages directory: " + dir
|
26
|
-
site.data['authors']
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
post.data['author']
|
31
|
-
|
26
|
+
if site.data['authors']
|
27
|
+
site.data['authors'].each do |author_key, author|
|
28
|
+
author_post = Array.new
|
29
|
+
site.posts.docs.each do |post|
|
30
|
+
if post.data['author'] == author_key
|
31
|
+
post.data['author'] = author
|
32
|
+
author_post << post
|
33
|
+
end
|
32
34
|
end
|
35
|
+
author['posts'] = author_post
|
36
|
+
author['slug'] = File.join(dir, Jekyll::Utils.slugify(author_key))
|
37
|
+
author['url'] = "/" + author['slug']
|
38
|
+
site.pages << AuthorPage.new(site, site.source, author['slug'], author)
|
33
39
|
end
|
34
|
-
|
35
|
-
author['slug'] = File.join(dir, Jekyll::Utils.slugify(author_key))
|
36
|
-
author['url'] = "/" + author['slug']
|
37
|
-
site.pages << AuthorPage.new(site, site.source, author['slug'], author)
|
38
|
-
end
|
40
|
+
end
|
39
41
|
end
|
40
42
|
end
|
41
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-author-pages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rohan Sakhale
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.10'
|
41
41
|
description: Generate Author pages for Jekyll based sites
|
42
|
-
email:
|
42
|
+
email: rs@saiashirwad.com
|
43
43
|
executables: []
|
44
44
|
extensions: []
|
45
45
|
extra_rdoc_files: []
|
@@ -50,7 +50,7 @@ files:
|
|
50
50
|
- lib/jekyll-author-pages.rb
|
51
51
|
- lib/jekyll/author.rb
|
52
52
|
- lib/jekyll/plugin_version.rb
|
53
|
-
homepage: https://gitlab.com/
|
53
|
+
homepage: https://gitlab.com/SaiLabs/Jekyll-Author-Pages
|
54
54
|
licenses:
|
55
55
|
- MIT
|
56
56
|
metadata:
|