diff --git a/features/collections.feature b/features/collections.feature index 84677831d58..5924e7e6bc6 100644 --- a/features/collections.feature +++ b/features/collections.feature @@ -610,3 +610,17 @@ Feature: Collections And I should see "Thanksgiving Black Friday" in "_site/index.html" And I should see "Happy Thanksgiving" in "_site/thanksgiving/2015-11-26-thanksgiving.html" And I should see "Black Friday" in "_site/thanksgiving/black-friday.html" + + Scenario: Rendered collection with custom permalinks and static file contents + Given I have fixture collections + And I have a "_config.yml" file with content: + """ + collections: + methods: + output: true + permalink: /:collection/:name + """ + When I run jekyll build + Then I should get a zero exit status + And the _site directory should exist + And I should see "I have no front matter." in "_site/methods/extensionless_static_file" diff --git a/lib/jekyll/static_file.rb b/lib/jekyll/static_file.rb index 0dce964049e..18bba13b10f 100644 --- a/lib/jekyll/static_file.rb +++ b/lib/jekyll/static_file.rb @@ -126,7 +126,7 @@ def placeholders :collection => @collection.label, :path => cleaned_relative_path, :output_ext => "", - :name => "", + :name => basename, :title => "", } end diff --git a/test/source/_methods/extensionless_static_file b/test/source/_methods/extensionless_static_file new file mode 100644 index 00000000000..b050c592890 --- /dev/null +++ b/test/source/_methods/extensionless_static_file @@ -0,0 +1 @@ +I have no front matter.