parent
130292f15e
commit
9195b61d51
|
@ -45,6 +45,8 @@ module Jekyll
|
||||||
index.htm
|
index.htm
|
||||||
index.html
|
index.html
|
||||||
index.rhtml
|
index.rhtml
|
||||||
|
index.xht
|
||||||
|
index.xhtml
|
||||||
index.cgi
|
index.cgi
|
||||||
index.xml
|
index.xml
|
||||||
index.json
|
index.json
|
||||||
|
|
|
@ -140,7 +140,9 @@ module Jekyll
|
||||||
end
|
end
|
||||||
|
|
||||||
def search_index_file(req, res)
|
def search_index_file(req, res)
|
||||||
super || search_file(req, res, ".html")
|
super ||
|
||||||
|
search_file(req, res, ".html") ||
|
||||||
|
search_file(req, res, ".xhtml")
|
||||||
end
|
end
|
||||||
|
|
||||||
# Add the ability to tap file.html the same way that Nginx does on our
|
# Add the ability to tap file.html the same way that Nginx does on our
|
||||||
|
@ -149,7 +151,9 @@ module Jekyll
|
||||||
|
|
||||||
def search_file(req, res, basename)
|
def search_file(req, res, basename)
|
||||||
# /file.* > /file/index.html > /file.html
|
# /file.* > /file/index.html > /file.html
|
||||||
super || super(req, res, "#{basename}.html")
|
super ||
|
||||||
|
super(req, res, "#{basename}.html") ||
|
||||||
|
super(req, res, "#{basename}.xhtml")
|
||||||
end
|
end
|
||||||
|
|
||||||
# rubocop:disable Naming/MethodName
|
# rubocop:disable Naming/MethodName
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">Content of foo.xhtml</html>
|
|
@ -34,5 +34,15 @@ class TestCommandsServeServlet < JekyllUnitTest
|
||||||
assert_equal("404", response.code)
|
assert_equal("404", response.code)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "find xhtml file" do
|
||||||
|
get("/bar/foo") do |response|
|
||||||
|
assert_equal("200", response.code)
|
||||||
|
assert_equal(
|
||||||
|
'<html xmlns="http://www.w3.org/1999/xhtml">Content of foo.xhtml</html>',
|
||||||
|
response.body.strip
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue