fix: unable to list uncategorized posts on the archive page (fix #471)

This commit is contained in:
saicaca committed 2025-05-30 19:42:45 +08:00
1 parent 4b30ff2b7b
commit dde7835dd7
7 files changed
+17 -130

No files matched your search

+1 -2
View File
@@ -4,7 +4,6 @@ import WidgetLayout from "./WidgetLayout.astro";
import I18nKey from "../../i18n/i18nKey";
import { i18n } from "../../i18n/translation";
import { getCategoryList } from "../../utils/content-utils";
import { getCategoryUrl } from "../../utils/url-utils";
import ButtonLink from "../control/ButtonLink.astro";
const categories = await getCategoryList();
@@ -27,7 +26,7 @@ const style = Astro.props.style;
>
{categories.map((c) =>
<ButtonLink
url={getCategoryUrl(c.name)}
url={c.url}
badge={String(c.count)}
label={`View all posts in the ${c.name.trim()} category`}
>