remove unnecessary Jekyll::Page constant (#6770)
Merge pull request 6770
This commit is contained in:
parent
c60dd66db5
commit
cf6d60b145
|
@ -11,8 +11,6 @@ module Jekyll
|
|||
|
||||
alias_method :extname, :ext
|
||||
|
||||
FORWARD_SLASH = "/".freeze
|
||||
|
||||
# Attributes for Liquid templates
|
||||
ATTRIBUTES_FOR_LIQUID = %w(
|
||||
content
|
||||
|
@ -64,11 +62,11 @@ module Jekyll
|
|||
#
|
||||
# Returns the String destination directory.
|
||||
def dir
|
||||
if url.end_with?(FORWARD_SLASH)
|
||||
if url.end_with?("/")
|
||||
url
|
||||
else
|
||||
url_dir = File.dirname(url)
|
||||
url_dir.end_with?(FORWARD_SLASH) ? url_dir : "#{url_dir}/"
|
||||
url_dir.end_with?("/") ? url_dir : "#{url_dir}/"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue