Merge pull request #1976 from jekyll/fix-pagination-issue
Relative posts should never fail to build, even if @dir or @name is nil
This commit is contained in:
commit
ac7bed335a
|
@ -126,7 +126,7 @@ module Jekyll
|
||||||
|
|
||||||
# The path to the page source file, relative to the site source
|
# The path to the page source file, relative to the site source
|
||||||
def relative_path
|
def relative_path
|
||||||
File.join(@dir, @name)
|
File.join(*[@dir, @name].map(&:to_s).reject(&:empty?))
|
||||||
end
|
end
|
||||||
|
|
||||||
# Obtain destination path.
|
# Obtain destination path.
|
||||||
|
|
|
@ -123,7 +123,7 @@ module Jekyll
|
||||||
|
|
||||||
# The path to the post source file, relative to the site source
|
# The path to the post source file, relative to the site source
|
||||||
def relative_path
|
def relative_path
|
||||||
File.join(@dir, '_posts', @name)
|
File.join(*[@dir, "_posts", @name].map(&:to_s).reject(&:empty?))
|
||||||
end
|
end
|
||||||
|
|
||||||
# Compares Post objects. First compares the Post date. If the dates are
|
# Compares Post objects. First compares the Post date. If the dates are
|
||||||
|
|
Loading…
Reference in New Issue