Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

I know this repo is designed to make a blog. But what if instead I want to build a knowledge base website (something between a wiki and a documentation page)?

If I create a subpage inside Notion, it deploys just fine in Vercel (the icon and the name of the subpage are there) but when I click it I get 404 error (notion page not found).

I understand this is because that page is not on the database that the API fetches content from. But is there a way to include subpages that are not blog entries? (even if it's through manually changing each link to a hidden blog entry)

Thank you

You must be logged in to vote

Replies: 2 comments

Comment options

Actually, you may build any website using this project. This project is based on react-notion-x which can transform your Notion page into a website just like what the Super.so does.

Subpages is supported in this project. For instance, the About page (roll down to the bottom on the demo Notion page and you will find this page) in the template Notion page is a subpage. If you get any error (like 404), try to redeploy your project.

You must be logged in to vote
0 replies
Comment options

I also had this issue where subpages (grandchildren of the main page) worked in dev mode but 404'd in prod.

I was able to fix this by updating the maxDepth parameter in get-site-map.ts.

async function getAllPagesImpl(
  rootNotionPageId: string,
  rootNotionSpaceId?: string,
  {
    maxDepth = 3
  }: {
    maxDepth?: number
  } = {}
): Promise<Partial<types.SiteMap>> {
  const pageMap = await getAllPagesInSpace(
    rootNotionPageId,
    rootNotionSpaceId,
    getPage,
    {
      maxDepth
    }
  )

^^^ The original maxDepth was 1, but when I changed it to 3 like above it fixed the issue for me.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.