diff --git a/lib/jekyll/feed_meta_tag.rb b/lib/jekyll/feed_meta_tag.rb index 0b059b3c..65c33df0 100644 --- a/lib/jekyll/feed_meta_tag.rb +++ b/lib/jekyll/feed_meta_tag.rb @@ -1,5 +1,8 @@ module Jekyll class FeedMetaTag < Liquid::Tag + # Use Jekyll's native relative_url filter + include Jekyll::Filters::URLFilters + def render(context) @context = context attrs = attributes.map { |k, v| %(#{k}="#{v}") }.join(" ") @@ -16,7 +19,7 @@ def attributes { :type => "application/atom+xml", :rel => "alternate", - :href => "#{url}/#{path}", + :href => absolute_url(path), :title => title }.keep_if { |_, v| v } end @@ -29,14 +32,6 @@ def path end end - def url - if config["url"] - URI.join(config["url"], config["baseurl"]) - elsif config["github"] && config["github"]["url"] - config["github"]["url"] - end - end - def title config["title"] || config["name"] end