Jekyll 提前约会
Jekyll date off by one
我最近在我的 Jekyll 博客上添加了一个 post,发现日期差了一个。
而不是
http://www.tianxiangxiong.com/2016/09/24/dont-be-a-hacker.html
我最后得到了
http://www.tianxiangxiong.com/2016/09/25/2016-09-24-dont-be-a-hacker.html
目前加利福尼亚州 10:30 下午(UTC 时间上午 5:30)左右。这是时区问题吗?如果是这样,为什么 Jekyll 关心我在文件名中指定的日期以外的任何日期?
看起来 post 实际上由于您前面的引号而损坏:
excerpt: "Hacking" is not a satisfactory way of writing software
应该是:
excerpt: '"Hacking" is not a satisfactory way of writing software'
时区问题可能是某种无意的后续行为,因为标题和永久链接也搞砸了。
无论如何,您始终可以将时区设置为 _config.yml
。
timezone: America/New_York
来自https://jekyllrb.com/docs/configuration/:
Time Zone
Set the time zone for site generation. This sets the TZ
environment variable, which Ruby uses to handle time and date creation and manipulation. Any entry from the IANA Time Zone Database is valid, e.g. America/New_York
. A list of all available values can be found here. The default is the local time zone, as set by your operating system.
我最近在我的 Jekyll 博客上添加了一个 post,发现日期差了一个。
而不是
http://www.tianxiangxiong.com/2016/09/24/dont-be-a-hacker.html
我最后得到了
http://www.tianxiangxiong.com/2016/09/25/2016-09-24-dont-be-a-hacker.html
目前加利福尼亚州 10:30 下午(UTC 时间上午 5:30)左右。这是时区问题吗?如果是这样,为什么 Jekyll 关心我在文件名中指定的日期以外的任何日期?
看起来 post 实际上由于您前面的引号而损坏:
excerpt: "Hacking" is not a satisfactory way of writing software
应该是:
excerpt: '"Hacking" is not a satisfactory way of writing software'
时区问题可能是某种无意的后续行为,因为标题和永久链接也搞砸了。
无论如何,您始终可以将时区设置为 _config.yml
。
timezone: America/New_York
来自https://jekyllrb.com/docs/configuration/:
Time Zone
Set the time zone for site generation. This sets the
TZ
environment variable, which Ruby uses to handle time and date creation and manipulation. Any entry from the IANA Time Zone Database is valid, e.g.America/New_York
. A list of all available values can be found here. The default is the local time zone, as set by your operating system.