Add static file's basename to its url_placeholder (#7908)

Merge pull request 7908
This commit is contained in:
Ashwin Maroli 2020-04-13 13:15:33 +05:30 committed by GitHub
parent 2c605bfeb3
commit be70c3e869
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 1 deletions

View File

@ -610,3 +610,17 @@ Feature: Collections
And I should see "Thanksgiving Black Friday" in "_site/index.html" 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 "Happy Thanksgiving" in "_site/thanksgiving/2015-11-26-thanksgiving.html"
And I should see "Black Friday" in "_site/thanksgiving/black-friday.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"

View File

@ -128,7 +128,7 @@ module Jekyll
:collection => @collection.label, :collection => @collection.label,
:path => cleaned_relative_path, :path => cleaned_relative_path,
:output_ext => "", :output_ext => "",
:name => "", :name => basename,
:title => "", :title => "",
} }
end end

View File

@ -0,0 +1 @@
I have no front matter.