views:

40

answers:

1

Is there a way to just pull the year (or any other element... month, day, etc) from the site.time property that is available to your template file in Jekyll?

Right now it returns, for example: Sat Dec 19 14:07:03 -0700 2009

Any help is appreciated. Thanks!

+2  A: 

The site.time item is available for templating using Liquid, so I think that you want something like this:

<h2>last modified: {{site.time | date: "%Y%m%d"}}</h2>

See here for more on Liquid: Liquid for Designers.

Telemachus
That works and thank you for the link!
adam.mokan