2023-09-26 14:27:38 +08:00
|
|
|
---
|
2023-12-14 13:43:06 +08:00
|
|
|
import {getCategoryList, getSortedPosts} from "../../../utils/content-utils";
|
2023-09-26 14:27:38 +08:00
|
|
|
import MainGridLayout from "../../../layouts/MainGridLayout.astro";
|
|
|
|
import ArchivePanel from "../../../components/ArchivePanel.astro";
|
2023-10-06 02:53:47 +08:00
|
|
|
import {i18n} from "../../../i18n/translation";
|
|
|
|
import I18nKey from "../../../i18n/i18nKey";
|
2023-09-26 14:27:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
export async function getStaticPaths() {
|
2023-12-14 13:43:06 +08:00
|
|
|
const categories = await getCategoryList();
|
|
|
|
return categories.map(category => {
|
2023-09-26 14:27:38 +08:00
|
|
|
return {
|
|
|
|
params: {
|
2023-12-14 13:43:06 +08:00
|
|
|
category: category.name
|
2023-09-26 14:27:38 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
const { category } = Astro.params;
|
|
|
|
|
|
|
|
---
|
|
|
|
|
2023-10-06 02:53:47 +08:00
|
|
|
<MainGridLayout title={i18n(I18nKey.archive)}>
|
2023-09-26 14:27:38 +08:00
|
|
|
<ArchivePanel categories={[category]}></ArchivePanel>
|
|
|
|
</MainGridLayout>
|