From 5445a1bead4d6257526208bed03f6eab078ab22c Mon Sep 17 00:00:00 2001 From: Pat Hawks Date: Sun, 14 Sep 2014 11:36:26 -0700 Subject: [PATCH 1/2] Add test for Use per-post permalinks ending in .htm --- features/permalinks.feature | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/features/permalinks.feature b/features/permalinks.feature index f63aaf81..67dfbb47 100644 --- a/features/permalinks.feature +++ b/features/permalinks.feature @@ -83,3 +83,13 @@ Feature: Fancy permalinks 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.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" From fdf58c5ce2ba9b294ff7aacadc7fafe70f648e0d Mon Sep 17 00:00:00 2001 From: Pat Hawks Date: Sun, 14 Sep 2014 11:58:16 -0700 Subject: [PATCH 2/2] Allow per post permalinks to end in `.htm` Fixes #2920 --- lib/jekyll/post.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index b13deff8..293e2c5d 100644 --- a/lib/jekyll/post.rb +++ b/lib/jekyll/post.rb @@ -269,7 +269,7 @@ module Jekyll def destination(dest) # The url needs to be unescaped in order to preserve the correct filename 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 end