mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-28 03:01:03 -04:00
Add static file's basename to its url_placeholder (#7908)
Merge pull request 7908
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -128,7 +128,7 @@ module Jekyll
|
||||
:collection => @collection.label,
|
||||
:path => cleaned_relative_path,
|
||||
:output_ext => "",
|
||||
:name => "",
|
||||
:name => basename,
|
||||
:title => "",
|
||||
}
|
||||
end
|
||||
|
||||
1
test/source/_methods/extensionless_static_file
Normal file
1
test/source/_methods/extensionless_static_file
Normal file
@@ -0,0 +1 @@
|
||||
I have no front matter.
|
||||
Reference in New Issue
Block a user