1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Jekyllでタイムゾーンを設定する話

Posted at

Jekyllでタイムゾーンを設定する話

目標

JekyllとGitHub Pagesを利用して運営しているサイトのタイムゾーンを日本に設定する

問題

朝ブログを投稿しようとしたところ、Pushしても反応がなかった。しかしActivity logを見る限りではちゃんとdeployされてる。

原因

Jekyllには未来の日時のページはサイトに反映させないという仕組みがあるため。またデフォルトではその判定をGMTを基準にしているため。つまり日付を1/1日にして 午前8時に投稿したとしても、GMTでは12/31 午後11時なので日付が未来になっているということで反映されない

解決策

_config.ymlにタイムゾーンを記載する。

_config.yml
timezone: Asia/Tokyo

おしまい

おしまいです。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?