Jekyll post not generated

前端 未结 9 1158
星月不相逢
星月不相逢 2020-12-04 14:53

I am trying to add a new post to my Jekyll site, but I cannot see it on the generated pages when I run jekyll serve.

What are some common reasons for a

9条回答
  •  长情又很酷
    2020-12-04 15:25

    One possible reason is that the date specified in the front matter does not contain a time zone offset, in which case it defaults to UTC, not the time zone of the local machine as you might expect. I wasted an hour on this until UTC "caught up" with my current local time zone, BST.

    I haven't found a definitive answer to this but I think the date in the front matter must be given in UTC with a timezone offset (which defaults to zero if omitted).

    So date: 2018-05-03 12:34:27 is in UTC irrespective of where in the world you are, and irrespective of the timezone setting in _config.yml.

    So be careful to specify datetimes like this:

    date: 2018-05-03 12:34:27 +0100
    

提交回复
热议问题