Skip to content

Commit

Permalink
Fix the timezone cause post can't be showed
Browse files Browse the repository at this point in the history
  • Loading branch information
XuPengfei committed Dec 22, 2023
1 parent 8409a83 commit 1a3bd49
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
_site
.DS_Store
.jekyll
.jekyll-metadata
.bundle
.sass-cache
Gemfile.lock
node_modules
package.json
*.gem
*.gemspec
.jekyll-cache
.jekyll-metadata
vendor
2 changes: 1 addition & 1 deletion _posts/2023-12-22-FromNowOn.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
date: 2023-12-22 22:19:43
date: 2023-12-22 22:19:43 +0800
layout: post
title: 重新整理了一下
categories: 文章
Expand Down
27 changes: 27 additions & 0 deletions _posts/2023-12-22-JekyllCantShowThePost.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
date: 2023-12-22 22:29:43 +0800
layout: post
title: Jekyll因为时区问题无法显示文章的解决办法
categories: Tips
tags: 新奇好玩
---

刚写好的文章push到GitHub上无法显示,Google了一下发现是因为时区的问题导致新提交的文章没有被编译。

解决的办法如下:

1、在_config.yml中添加时区设定

```
timezone: Asia/Shanghai
```

2、在文章头部的时间戳位置添加 +0800

```
date: 2023-12-22 22:29:43 +0800
```

参考链接:

<https://changwh.github.io/2019/03/17/timezone-issue-in-jekyll/>

0 comments on commit 1a3bd49

Please sign in to comment.