1+ # Modified slightly from: https://github.com/jekyller/jasper2/blob/master/_plugins/jekyll-autgenerator.rb
2+
13module Jekyll
24
35 class AuthorsGenerator < Generator
4-
6+
57 safe true
68
79 def generate ( site )
@@ -13,8 +15,8 @@ def generate(site)
1315 end
1416 end
1517
16- def build_subpages ( site , type , posts )
17- posts [ 1 ] = posts [ 1 ] . sort_by { |p | -p . date . to_f }
18+ def build_subpages ( site , type , posts )
19+ posts [ 1 ] = posts [ 1 ] . sort_by { |p | -p . date . to_f }
1820 atomize ( site , type , posts )
1921 paginate ( site , type , posts )
2022 end
@@ -35,7 +37,7 @@ def paginate(site, type, posts)
3537 end
3638 newpage = GroupSubPageAuthor . new ( site , site . source , path , type , posts [ 0 ] )
3739 newpage . pager = pager
38- site . pages << newpage
40+ site . pages << newpage
3941
4042 end
4143 end
@@ -54,7 +56,7 @@ def initialize(site, base, dir, type, val)
5456 self . data [ type ] = val
5557 end
5658 end
57-
59+
5860 class AtomPageAuthor < Page
5961 def initialize ( site , base , dir , type , val , posts )
6062 @site = site
@@ -69,4 +71,4 @@ def initialize(site, base, dir, type, val, posts)
6971 self . data [ "posts" ] = posts [ 0 ..9 ]
7072 end
7173 end
72- end
74+ end
0 commit comments