Skip to content

Commit d3862c9

Browse files
committed
feat: catch all paths for pageUrlOverrides
1 parent 1fdecd6 commit d3862c9

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)
@@ -33,7 +33,7 @@ export async function getStaticPaths() {
3333
const staticPaths = {
3434
paths: Object.keys(siteMap.canonicalPageMap).map((pageId) => ({
3535
params: {
36-
pageId
36+
pageId: pageId.split('/')
3737
}
3838
})),
3939
// paths: [],

0 commit comments

Comments
 (0)