diff --git a/theme/src/client/components/Page.vue b/theme/src/client/components/Page.vue index 4332b59d5..83ad2320d 100644 --- a/theme/src/client/components/Page.vue +++ b/theme/src/client/components/Page.vue @@ -193,7 +193,7 @@ onContentUpdated(() => zoom?.refresh()) @media (min-width: 1440px) { .plume-page:not(.has-sidebar) .content { - max-width: 784px; + max-width: 884px; } .plume-page:not(.has-sidebar) .container { diff --git a/theme/src/client/composables/page.ts b/theme/src/client/composables/page.ts index e1a1fbb2b..249dde84e 100644 --- a/theme/src/client/composables/page.ts +++ b/theme/src/client/composables/page.ts @@ -60,8 +60,8 @@ export function useLastUpdated() { const frontmatter = usePageFrontmatter() const lang = usePageLang() - const date = computed(() => new Date(page.value.git?.updatedTime ?? '')) - const isoDatetime = computed(() => date.value.toISOString()) + const date = computed(() => page.value.git?.updatedTime ? new Date(page.value.git.updatedTime) : null) + const isoDatetime = computed(() => date.value?.toISOString()) const datetime = ref('') @@ -76,13 +76,15 @@ export function useLastUpdated() { if (frontmatter.value.lastUpdated === false || theme.value.lastUpdated === false) return - datetime.value = new Intl.DateTimeFormat( - theme.value.lastUpdated?.formatOptions?.forceLocale ? lang.value : undefined, - theme.value.lastUpdated?.formatOptions ?? { - dateStyle: 'short', - timeStyle: 'short', - }, - ).format(date.value) + datetime.value = date.value + ? new Intl.DateTimeFormat( + theme.value.lastUpdated?.formatOptions?.forceLocale ? lang.value : undefined, + theme.value.lastUpdated?.formatOptions ?? { + dateStyle: 'short', + timeStyle: 'short', + }, + ).format(date.value) + : '' }) })