NotionX / NotionX/react-notion-x

Changing Content in Notion does not reflect on Website without redeployment [Next.js]

Open
#307 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5.4k
Forks
645
PR merge metrics
No merged PRs in 30d

Description

Description

Here I set up a simple Next.js page with getStaticProps. The revalidate is set to 10 already, but changing on the Notion Page still does not change the content of the website (even with a hard reload, or incognito tab, delete cache, etc.)

image

However, when I made a similar page called draft with simple text like this. The data is up to date.
image

export async function getStaticProps() {
  const recordMap = await notion.getPage(
    parsePageId(
      "https://www.notion.so/iant1359/beautifulliving-4f5542a8d593408ab8b9114db063c32e"
    )
  )
  return { props: { recordMap }, revalidate: 10 }
}

const BeautifulLiving = ({ recordMap }) => {
  return (
    <S.BeautifulLiving>
      <Section />
      <NotionPage
        recordMap={recordMap}
        previewImagesEnabled={previewImagesEnabled}
      />
    </S.BeautifulLiving>
  )
}

Notion Test Page ID

Please include the ID of at least one publicly accessible Notion page related to your issue.
Here is the public Notion Link
https://iant1359.notion.site/beautifulliving-4f5542a8d593408ab8b9114db063c32e

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the supplied getStaticProps example and its notion.getPage call, then reproduce the behavior using the public Notion page and revalidate: 10. Compare the page using structured Notion content with the draft page that updates correctly. Done means published content reflects Notion changes after revalidation without a redeployment.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, react, typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.