gjtorikian / jekyll-last-modified-at

A Jekyll plugin to show the last_modified_at time of a post.
MIT License
244 stars 39 forks source link

Date Display Customization? #3

Closed parkr closed 10 years ago

parkr commented 10 years ago

I noticed that the date is displayed only as %d-%b-%y, and there's no way to customize it. I think it'd be useful for it to be customizable. Here are the three approaches I think might be wise:

Thoughts?

gjtorikian commented 10 years ago

I'm in favor of option 1; I'll set about implementing it. Reason being that maybe you want a different date formats in different parts of the page for some reason.

Also can't we just pass the format directly through the tag? Like {% last_modified_at %b-%d-%Y %}.

parkr commented 10 years ago

Yeah, you can throw the format in as an argument. So it returns the time object if there's no format, or a formatted string if there is?