From 38b64faeb2823cbf0927193f28bf83673ba4cd93 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 26 Jan 2016 16:44:30 -0800 Subject: [PATCH] Page#dir: ensure it ends in a slash --- lib/jekyll/page.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/jekyll/page.rb b/lib/jekyll/page.rb index eda87f123..6bdfb6bc4 100644 --- a/lib/jekyll/page.rb +++ b/lib/jekyll/page.rb @@ -55,7 +55,9 @@ module Jekyll # # Returns the String destination directory. def dir - url[-1, 1] == '/' ? url : File.dirname(url) + dest_dir = url[-1, 1] == '/' ? url : File.dirname(url) + dest_dir << '/' unless dest_dir.end_with?('/') + dest_dir end # The full path and filename of the post. Defined in the YAML of the post