We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
pageUrlOverrides
1 parent aed9b20 commit 1907a34Copy full SHA for 1907a34
pages/[pageId].tsx renamed to pages/[...pageId].tsx
@@ -5,7 +5,7 @@ import { resolveNotionPage } from 'lib/resolve-notion-page'
5
import { NotionPage } from 'components'
6
7
export const getStaticProps = async (context) => {
8
- const rawPageId = context.params.pageId as string
+ const rawPageId = (context.params.pageId).join('/')
9
10
try {
11
const props = await resolveNotionPage(domain, rawPageId)
@@ -34,7 +34,7 @@ export async function getStaticPaths() {
34
paths: siteMaps.flatMap((siteMap) =>
35
Object.keys(siteMap.canonicalPageMap).map((pageId) => ({
36
params: {
37
- pageId
+ pageId: pageId.split('/')
38
}
39
}))
40
),
0 commit comments