Permalinks which end in a slash should always output HTML
Duplicates #4493 for 3.1.1. /cc @jekyll/core
This commit is contained in:
parent
3b93625a8f
commit
d929242e2b
|
@ -217,8 +217,11 @@ module Jekyll
|
||||||
def destination(base_directory)
|
def destination(base_directory)
|
||||||
dest = site.in_dest_dir(base_directory)
|
dest = site.in_dest_dir(base_directory)
|
||||||
path = site.in_dest_dir(dest, URL.unescape_path(url))
|
path = site.in_dest_dir(dest, URL.unescape_path(url))
|
||||||
path = File.join(path, "index.html") if url.end_with?("/")
|
if url.end_with? "/"
|
||||||
path << output_ext unless path.end_with? output_ext
|
path = File.join(path, "index.html")
|
||||||
|
else
|
||||||
|
path << output_ext unless path.end_with? output_ext
|
||||||
|
end
|
||||||
path
|
path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
---
|
||||||
|
|
||||||
|
I should be output to `/with.dots/mit/index.html`.
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
permalink: /contacts/humans/
|
||||||
|
---
|
||||||
|
|
||||||
|
I should be output to `/contacts/humans/index.html`.
|
|
@ -203,7 +203,7 @@ class TestCollections < JekyllUnitTest
|
||||||
end
|
end
|
||||||
|
|
||||||
should "contain one document" do
|
should "contain one document" do
|
||||||
assert_equal 3, @collection.docs.size
|
assert_equal 4, @collection.docs.size
|
||||||
end
|
end
|
||||||
|
|
||||||
should "allow dots in the filename" do
|
should "allow dots in the filename" do
|
||||||
|
|
|
@ -285,7 +285,7 @@ class TestFilters < JekyllUnitTest
|
||||||
assert_equal 2, g["items"].size
|
assert_equal 2, g["items"].size
|
||||||
when ""
|
when ""
|
||||||
assert g["items"].is_a?(Array), "The list of grouped items for '' is not an Array."
|
assert g["items"].is_a?(Array), "The list of grouped items for '' is not an Array."
|
||||||
assert_equal 12, g["items"].size
|
assert_equal 13, g["items"].size
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -178,6 +178,7 @@ class TestSite < JekyllUnitTest
|
||||||
environment.html
|
environment.html
|
||||||
exploit.md
|
exploit.md
|
||||||
foo.md
|
foo.md
|
||||||
|
humans.txt
|
||||||
index.html
|
index.html
|
||||||
index.html
|
index.html
|
||||||
main.scss
|
main.scss
|
||||||
|
|
Loading…
Reference in New Issue