vuejs / vitepress

Vite & Vue powered static site generator.

Home Page:https://vitepress.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LastUpdated在Safari上不显示

BlazeSnow opened this issue · comments

Describe the bug

https://vitepress.dev/

Microsoft edge

官网-电脑

safari

官网-ios

mywebsite

Microsoft edge

我的-电脑

safari

我的-ios

Reproduction

LastUpdated在Safari上不显示

Expected behavior

LastUpdated应当在Safari上显示

System Info

Microsoft Edge
版本 126.0.2592.61 (正式版本) (64 位)

iOS 17.5.1

Additional context

lastUpdated: {
text: '上次更新时间',
formatOptions: {
localeMatcher: "best fit",
weekday: undefined,
era: undefined,
year: "numeric",
month: "long",
day: "numeric",
hour: "numeric",
minute: "numeric",
second: undefined,
timeZoneName: "longGeneric",
formatMatcher: "best fit",
hour12: true,
timeZone: "Asia/Chongqing"
}
},

Validations

Please share a minimal reproducible example in the form of some git repo. I'm unable to reproduce this using just the config you've shared.

You have specified lastUpdated: 2024-6-21 18:00 in frontmatter which is not valid yaml timestamp format - https://yaml.org/type/timestamp.html

It should be lastUpdated: 2024-6-21 18:00:00

Valid formats are:

canonical:        2001-12-15T02:59:43.1Z
valid iso8601:    2001-12-14t21:59:43.10-05:00
space separated:  2001-12-14 21:59:43.10 -5
no time zone (Z): 2001-12-15 2:59:43.10
date (00:00:00Z): 2002-12-14

谢谢你的帮助
我修改格式后,Safari可以正常显示了