Merge pull request #2925 from pathawks/htm-extension
This commit is contained in:
commit
bd0eebdb05
|
@ -83,3 +83,13 @@ Feature: Fancy permalinks
|
||||||
Then the _site directory should exist
|
Then the _site directory should exist
|
||||||
And the _site/custom/posts directory should exist
|
And the _site/custom/posts directory should exist
|
||||||
And I should see "bla bla" in "_site/custom/posts/some.html"
|
And I should see "bla bla" in "_site/custom/posts/some.html"
|
||||||
|
|
||||||
|
Scenario: Use per-post ending in .htm
|
||||||
|
Given I have a _posts directory
|
||||||
|
And I have the following post:
|
||||||
|
| title | date | permalink | content |
|
||||||
|
| Some post | 2013-04-14 | /custom/posts/some.htm | bla bla |
|
||||||
|
When I run jekyll build
|
||||||
|
Then the _site directory should exist
|
||||||
|
And the _site/custom/posts directory should exist
|
||||||
|
And I should see "bla bla" in "_site/custom/posts/some.htm"
|
||||||
|
|
|
@ -269,7 +269,7 @@ module Jekyll
|
||||||
def destination(dest)
|
def destination(dest)
|
||||||
# The url needs to be unescaped in order to preserve the correct filename
|
# The url needs to be unescaped in order to preserve the correct filename
|
||||||
path = Jekyll.sanitized_path(dest, URL.unescape_path(url))
|
path = Jekyll.sanitized_path(dest, URL.unescape_path(url))
|
||||||
path = File.join(path, "index.html") if path[/\.html$/].nil?
|
path = File.join(path, "index.html") if path[/\.html?$/].nil?
|
||||||
path
|
path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue