Everyone loves Notion. Writing in Notion is an ultimate pleasure if you have an eye for simple but elegant design. However, what you type in Notion stays in Notion, unless you make it as a public link.
I created a minimal application in Flask for testing this idea. For implementation, I checked out Notion’s official JS SDK and tested reverse-engineering in Flask. The template file barely contains anything: just a layout to contain Notion documents and stylesheet. The pages can be iterated within single variable rule for routing :
For a simple demonstration, I create a main page which has redirects to other pages in Notion.
Same page with all links is parsed as:
For being able to use the integration, first the user should obtain integration token from Settings -> Integrations. Second, the pages should be enabled for integration from page “Share” menu.
The API itself is well documented, however, since it is still in beta version, it doesn’t support all the fancy blocks we love in Notion.
Official JS SDK: https://github.com/makenotion/notion-sdk-js