Skip to content

Added abbreviated month + test. #890

Merged
merged 2 commits into from Apr 5, 2013

3 participants

@zachgersh

This is my stab at #410. Hopefully this helps us get to the 1.0 milestone! Know the change is relatively simple but if you need anything drop me a comment.

@mattr-
Jekyll member
mattr- commented Mar 27, 2013

👍 from me. Would prefer to see my change to the key made before this is merged, but either way, I'm good with this.

@parkr
Jekyll member
parkr commented Mar 27, 2013

I'd prefer something like short_month. @mojombo will probably have thoughts on this as well.

@zachgersh

@parkr @mattr- figured the thing that would be most up for discussion was the naming convention 😉

Thanks so much for the feedback! Let me know if this should be changed around again.

@zachgersh

Any word on a merge for this guys? Already working on a separate commit for another issue I'd like to tackle!

@parkr parkr commented on the diff Apr 3, 2013
test/test_post.rb
@@ -225,6 +225,17 @@ def do_render(post)
end
end
+ context "with custom abbreviated month date permalink" do
+ setup do
+ @post.site.permalink_style = '/:categories/:year/:short_month/:day/:title/'
+ @post.process(@fake_file)
+ end
+
+ should "process the url correctly" do
+ assert_equal "/2008/Sep/09/foo-bar/", @post.url
@parkr
Jekyll member
parkr added a note Apr 3, 2013

Any reason you would prefer capitalized over lowercase?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@zachgersh

I believe it's automatically returned capitalized. I have no preference either way and we could standardize on lowercase if that is the preferred way to go. Could set to lowercase and add another test to make sure the casing is always consistent?

@parkr
Jekyll member
parkr commented Apr 4, 2013

Right, that's what I was thinking. I'm just not sure I like the lowercase version... Hm.

Do you have a preference? As you write your blog, would you prefer one or the other?

@zachgersh

Personally, for me, I'd prefer the month's to stick to the capitalized abbreviation as that would be my expectation if I was going to abbreviate a month anywhere.

@parkr
Jekyll member
parkr commented Apr 5, 2013

Ok capital it is!

@parkr parkr merged commit 483a0b6 into jekyll:master Apr 5, 2013

1 check passed

Details default The Travis build passed
@parkr parkr added a commit that referenced this pull request Apr 5, 2013
@parkr parkr Update history to reflect merge of #890 464ea6e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.