post_url: fix access deprecation warning & fix deprecation msg
This commit is contained in:
		
							parent
							
								
									35ddbe9398
								
							
						
					
					
						commit
						79c33af3fc
					
				|  | @ -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." | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue