diff --git a/src/components/PostCard.astro b/src/components/PostCard.astro index 609a482..6116c3e 100644 --- a/src/components/PostCard.astro +++ b/src/components/PostCard.astro @@ -40,6 +40,7 @@ const className = Astro.props.class; const hasCover = image !== undefined && image !== null && image !== ""; const coverWidth = "28%"; +const isOutdated = entry.data.outdated; const { remarkPluginFrontmatter } = await render(entry); --- @@ -67,13 +68,18 @@ const { remarkPluginFrontmatter } = await render(entry); -
+
{remarkPluginFrontmatter.words} {" " + i18n(I18nKey.wordsCount)}
|
{remarkPluginFrontmatter.minutes} {" " + i18n(I18nKey.minutesCount)}
|
-
+
加载中... + {isOutdated && ( + + 已失效 + + )}
diff --git a/src/pages/posts/[...slug].astro b/src/pages/posts/[...slug].astro index 3a3d332..6fffa48 100644 --- a/src/pages/posts/[...slug].astro +++ b/src/pages/posts/[...slug].astro @@ -128,7 +128,7 @@ const isOutdated = entry.data.outdated; >
{isOutdated ? ( - <>本文内容部分或全部可能已失效,请谨慎参考。 + <>本文部分内容可能已失效,请谨慎参考。 ) : ( <> 本文最后更新于 {lastUpdatedLabel},距今 计算中...