Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the expected date format in the YAML frontmatter of a post in Jekyll?

According to Jekyll's frontmatter documentation, a date variable can be used to specify a date and time of when the post was published. Which date format is Jekyll expecting here? Some examples I've seen show, e.g:

date: 2010-09-15 14:40:45

but is it possible to also include time zone information? How is Jekyll going to parse this string?

like image 350
Juan A. Navarro Avatar asked Aug 21 '13 16:08

Juan A. Navarro


1 Answers

When building paths Jekyll will only parse the date portion and ignore the time part.

In a template calling page.date will return the date/time of the post or the full date / time from the front matter if included.

You can include a UTC offset in the date YYYY-MM-DD HH:MM:SS +/-TTTT

like image 115
RobertKenny Avatar answered Nov 05 '22 09:11

RobertKenny