mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-28 03:01:03 -04:00
Merge pull request #928 from danieldriver/ordinal_date
add ordinal date permalink style (/YYYY/DDD/slug.html)
This commit is contained in:
@@ -214,6 +214,18 @@ class TestPost < Test::Unit::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
context "with ordinal style" do
|
||||
setup do
|
||||
@post.site.permalink_style = :ordinal
|
||||
@post.process(@fake_file)
|
||||
end
|
||||
|
||||
should "process the url correctly" do
|
||||
assert_equal "/:categories/:year/:y_day/:title.html", @post.template
|
||||
assert_equal "/2008/253/foo-bar.html", @post.url
|
||||
end
|
||||
end
|
||||
|
||||
context "with custom date permalink" do
|
||||
setup do
|
||||
@post.site.permalink_style = '/:categories/:year/:i_month/:i_day/:title/'
|
||||
|
||||
Reference in New Issue
Block a user