Skip to content

Commit 1907a34

Browse files
committed
feat: catch all paths for pageUrlOverrides
1 parent aed9b20 commit 1907a34

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
@@ -5,7 +5,7 @@ import { resolveNotionPage } from 'lib/resolve-notion-page'
55
import { NotionPage } from 'components'
66

77
export const getStaticProps = async (context) => {
8-
const rawPageId = context.params.pageId as string
8+
const rawPageId = (context.params.pageId).join('/')
99

1010
try {
1111
const props = await resolveNotionPage(domain, rawPageId)
@@ -34,7 +34,7 @@ export async function getStaticPaths() {
3434
paths: siteMaps.flatMap((siteMap) =>
3535
Object.keys(siteMap.canonicalPageMap).map((pageId) => ({
3636
params: {
37-
pageId
37+
pageId: pageId.split('/')
3838
}
3939
}))
4040
),

0 commit comments

Comments
 (0)