mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-06 03:01:43 -04:00
The :title URL placeholder for collections should be the filename slug.
This mimicks posts most closely. It can be overridden by the YAML front matter. Undoes some of #2864.
This commit is contained in:
@@ -249,15 +249,20 @@ class TestDocument < Test::Unit::TestCase
|
||||
}))
|
||||
@site.process
|
||||
@document = @site.collections["slides"].docs[3]
|
||||
@document_without_title = @site.collections["slides"].docs[4]
|
||||
@document_without_slug = @site.collections["slides"].docs[4]
|
||||
@document_with_strange_slug = @site.collections["slides"].docs[5]
|
||||
end
|
||||
|
||||
should "produce the right URL if they have a title" do
|
||||
should "produce the right URL if they have a slug" do
|
||||
assert_equal "/slides/so-what-is-jekyll-exactly", @document.url
|
||||
end
|
||||
|
||||
should "produce the right URL if they don't have a title" do
|
||||
assert_equal "/slides/example-slide-5", @document_without_title.url
|
||||
should "produce the right URL if they don't have a slug" do
|
||||
assert_equal "/slides/example-slide-5", @document_without_slug.url
|
||||
end
|
||||
|
||||
should "produce the right URL if they have a wild slug" do
|
||||
assert_equal "/slides/well-so-what-is-jekyll-then", @document_with_strange_slug.url
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user