79110564

Date: 2024-10-21 14:50:47
Score: 1
Natty:
Report link

Hey hey just a thought since it's kinda fresh in my head. While there isn't a direct "Publish to Web" API endpoint in Notion, you can achieve similar functionality by building a custom solution. Here's how I've implemented something similar:

  1. Without ISR (Manual Updates): When deployed to Vercel without Incremental Static Regeneration (ISR), the site would only update when manually redeployed. This is somewhat similar to Notion's "Publish to Web" feature (in a way, I guess?), where you need to manually trigger an update.

  2. With ISR (Near Real-Time Updates): By implementing ISR with a short revalidation period (e.g., 60 seconds), the website automatically updates with the latest Notion content. This creates a near real-time sync between your Notion database and the published web page.

This method gives you more control over the published output while maintaining a connection to your Notion content. I guess it's not exactly the same as Notion's "Publish to Web", as per your question but it might achieve a similar goal of making your Notion content publicly accessible and regularly updated (am assuming you were wanting to publish Notion content?)

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: 0xAZ