1
0
Fork 0

Use feed URLs that are compatible with the ones used by Wordpress

This commit is contained in:
Luca Beltrame 2015-05-10 00:24:09 +02:00
parent 2a72ff3658
commit 3e689f7bd6

View file

@ -116,7 +116,7 @@ module Jekyll
site.static_files << FeedFile.new(
site,
site.dest,
'',
'feed',
# feed_dir,
'atom.xml',
site.site_payload['site']['posts'])
@ -125,7 +125,7 @@ module Jekyll
site.site_payload['site']['categories'].each do |category, pages|
site.static_files << FeedFile.new(
site, site.dest,
File.join(feed_dir, Jekyll::Utils::slugify(category), 'rss'),
File.join(feed_dir, Jekyll::Utils::slugify(category), 'feed'),
'atom.xml',
pages,
category)
@ -144,15 +144,15 @@ module Jekyll
category = nil
page_url.split('/').reverse_each do | path_part |
if site.site_payload['site']['categories'].has_key? path_part
category = path_part
category = Jekyll::Utils::slugify(path_part)
break
end
end
if category
feed_url = URI.escape("/#{feed_dir}/#{category}/atom.xml")
feed_url = URI.escape("/#{feed_dir}/#{category}/feed/atom.xml")
else
feed_url = URI.escape("/#{feed_dir}/atom.xml")
feed_url = URI.escape("/feed/atom.xml")
end
feed_url