Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add static file's basename to its url_placeholder #7908

Merged
merged 3 commits into from Apr 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions features/collections.feature
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion lib/jekyll/static_file.rb
Expand Up @@ -126,7 +126,7 @@ def placeholders
:collection => @collection.label,
:path => cleaned_relative_path,
:output_ext => "",
:name => "",
:name => basename,
:title => "",
}
end
Expand Down
1 change: 1 addition & 0 deletions test/source/_methods/extensionless_static_file
@@ -0,0 +1 @@
I have no front matter.