Skip to content

Commit 8be9761

Browse files
committed
add source ref for inlined plugin jekyll-tagsgenerator
1 parent d1ce93b commit 8be9761

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

_plugins/jekyll-taggenerator.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
# Modified slightly from: https://github.com/jekyller/jasper2/blob/master/_plugins/jekyll-tagsgenerator.rb
12
module Jekyll
23

34
class TagsGenerator < Generator
4-
5+
56
safe true
67

78
def generate(site)
@@ -10,8 +11,8 @@ def generate(site)
1011
end
1112
end
1213

13-
def build_subpages(site, type, posts)
14-
posts[1] = posts[1].sort_by { |p| -p.date.to_f }
14+
def build_subpages(site, type, posts)
15+
posts[1] = posts[1].sort_by { |p| -p.date.to_f }
1516
atomize(site, type, posts)
1617
paginate(site, type, posts)
1718
end
@@ -32,7 +33,7 @@ def paginate(site, type, posts)
3233
end
3334
newpage = GroupSubPageTags.new(site, site.source, path, type, posts[0])
3435
newpage.pager = pager
35-
site.pages << newpage
36+
site.pages << newpage
3637

3738
end
3839
end
@@ -66,4 +67,4 @@ def initialize(site, base, dir, type, val, posts)
6667
self.data["posts"] = posts[0..9]
6768
end
6869
end
69-
end
70+
end

0 commit comments

Comments
 (0)