From 79c33af3fc8966cce2ecd4343d2952ba0ca5d468 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Mon, 26 Oct 2015 14:43:53 -0700 Subject: [PATCH] post_url: fix access deprecation warning & fix deprecation msg --- lib/jekyll/tags/post_url.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/jekyll/tags/post_url.rb b/lib/jekyll/tags/post_url.rb index 2d3e8f44..5b0d6479 100644 --- a/lib/jekyll/tags/post_url.rb +++ b/lib/jekyll/tags/post_url.rb @@ -59,7 +59,7 @@ eos def render(context) site = context.registers[:site] - site.posts.each do |p| + site.posts.docs.each do |p| if @post == p return p.url end @@ -68,9 +68,9 @@ eos # New matching method did not match, fall back to old method # with deprecation warning if this matches - site.posts.each do |p| + site.posts.docs.each do |p| if @post.deprecated_equality p - Jekyll::Deprecator.deprecation_message "A call to '{{ post_url #{name} }}' did not match " + + Jekyll::Deprecator.deprecation_message "A call to '{{ post_url #{@post.name} }}' did not match " + "a post using the new matching method of checking name " + "(path-date-slug) equality. Please make sure that you " + "change this tag to match the post's name exactly."