Skip to content

Commit d0533c3

Browse files
committed
feat: catch all paths for pageUrlOverrides
1 parent 7193796 commit d0533c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pages/[pageId].tsx renamed to pages/[...pageId].tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { PageProps, Params } from '@/lib/types'
1010
export const getStaticProps: GetStaticProps<PageProps, Params> = async (
1111
context
1212
) => {
13-
const rawPageId = context.params.pageId as string
13+
const rawPageId = (context.params.pageId).join('/')
1414

1515
try {
1616
const props = await resolveNotionPage(domain, rawPageId)
@@ -38,7 +38,7 @@ export async function getStaticPaths() {
3838
const staticPaths = {
3939
paths: Object.keys(siteMap.canonicalPageMap).map((pageId) => ({
4040
params: {
41-
pageId
41+
pageId: pageId.split('/')
4242
}
4343
})),
4444
// paths: [],

0 commit comments

Comments
 (0)