25 lines
676 B
Plaintext
25 lines
676 B
Plaintext
---
|
|
import { getCategoryList } from '@utils/content-utils'
|
|
import MainGridLayout from '@layouts/MainGridLayout.astro'
|
|
import ArchivePanel from '@components/ArchivePanel.astro'
|
|
import { i18n } from '@i18n/translation'
|
|
import I18nKey from '@i18n/i18nKey'
|
|
|
|
export async function getStaticPaths() {
|
|
const categories = await getCategoryList()
|
|
return categories.map(category => {
|
|
return {
|
|
params: {
|
|
category: category.name,
|
|
},
|
|
}
|
|
})
|
|
}
|
|
|
|
const category = Astro.params.category as string
|
|
---
|
|
|
|
<MainGridLayout title={i18n(I18nKey.archive)} description={i18n(I18nKey.archive)}>
|
|
<ArchivePanel categories={[category]}></ArchivePanel>
|
|
</MainGridLayout>
|