From 62580f7c174e6fc5d4fac36da8e696526ff6a08e Mon Sep 17 00:00:00 2001 From: Meitar M Date: Mon, 13 Jul 2020 15:09:21 -0400 Subject: [PATCH] Use `relative_url` to generate feed path link. Using the relative URL allows the plugin to be used without modification when generating sites that may be deployed across more than one domain name without needing to have the site regenerated for each domain name. This commit also aligns the code with the code's comments (added in commit bf728c32) which say that the built-in Jekyll URLFilters are being used to provide the `relative_url` functionality, but then the code goes on to use the `absolute_url` filter. Using the `relative_url` filter does not impact feed reader use (at least, in my testing), so this should be a backward-compatible change that improves the versatility of the rendered HTML code. --- lib/jekyll-feed/meta-tag.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll-feed/meta-tag.rb b/lib/jekyll-feed/meta-tag.rb index 6a47a095..1d010ae1 100644 --- a/lib/jekyll-feed/meta-tag.rb +++ b/lib/jekyll-feed/meta-tag.rb @@ -21,7 +21,7 @@ def attributes { :type => "application/atom+xml", :rel => "alternate", - :href => absolute_url(path), + :href => relative_url(path), :title => title, }.keep_if { |_, v| v } end