分页多语言

This commit is contained in:
tangly1024.com
2024-10-08 17:41:21 +08:00
parent d26bbf5756
commit 6c452c22de

View File

@@ -34,9 +34,9 @@ export async function getStaticPaths({ locale }) {
}
}
export async function getStaticProps({ params: { page } }) {
export async function getStaticProps({ params: { page }, locale }) {
const from = `page-${page}`
const props = await getGlobalData({ from })
const props = await getGlobalData({ from, locale })
const { allPages } = props
const POST_PREVIEW_LINES = siteConfig(
'POST_PREVIEW_LINES',