Merge pull request #2832 from tangly1024/fix/language-page

分页多语言
This commit is contained in:
tangly1024
2024-10-08 17:41:56 +08:00
committed by GitHub

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',