Page#dir: ensure it ends in a slash
This commit is contained in:
parent
ce77fe6488
commit
38b64faeb2
|
@ -55,7 +55,9 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns the String destination directory.
|
# Returns the String destination directory.
|
||||||
def dir
|
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
|
end
|
||||||
|
|
||||||
# The full path and filename of the post. Defined in the YAML of the post
|
# The full path and filename of the post. Defined in the YAML of the post
|
||||||
|
|
Loading…
Reference in New Issue