Simple modifications to the category_feed plugins
This commit is contained in:
parent
f615dcc711
commit
6f5b35f191
1 changed files with 11 additions and 2 deletions
|
@ -47,6 +47,14 @@ module Jekyll
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def header()
|
||||||
|
formatted = Jekyll::Utils::slugify(@category)
|
||||||
|
return "---\n"\
|
||||||
|
"permalink: /#{@dir}/#{@formatted}/\n"\
|
||||||
|
"layout: null\n"\
|
||||||
|
"---"
|
||||||
|
end
|
||||||
|
|
||||||
# Creates our feed using the Atom library.
|
# Creates our feed using the Atom library.
|
||||||
def createFeed
|
def createFeed
|
||||||
feed = Atom::Feed.new self.url
|
feed = Atom::Feed.new self.url
|
||||||
|
@ -108,7 +116,8 @@ module Jekyll
|
||||||
site.static_files << FeedFile.new(
|
site.static_files << FeedFile.new(
|
||||||
site,
|
site,
|
||||||
site.dest,
|
site.dest,
|
||||||
feed_dir,
|
'',
|
||||||
|
# feed_dir,
|
||||||
'atom.xml',
|
'atom.xml',
|
||||||
site.site_payload['site']['posts'])
|
site.site_payload['site']['posts'])
|
||||||
|
|
||||||
|
@ -116,7 +125,7 @@ module Jekyll
|
||||||
site.site_payload['site']['categories'].each do |category, pages|
|
site.site_payload['site']['categories'].each do |category, pages|
|
||||||
site.static_files << FeedFile.new(
|
site.static_files << FeedFile.new(
|
||||||
site, site.dest,
|
site, site.dest,
|
||||||
File.join(feed_dir, category),
|
File.join(feed_dir, Jekyll::Utils::slugify(category), 'rss'),
|
||||||
'atom.xml',
|
'atom.xml',
|
||||||
pages,
|
pages,
|
||||||
category)
|
category)
|
||||||
|
|
Reference in a new issue