Hello Notion! This isn’t to announce that I’m starting a new venture at Notion but instead to talk through using Notion as the backend to my static personal website that you’re on right now so that I can reduce the friction of posting (and hopefully post more frequently).
Previous Setup
Previously, my website was setup to use just raw markdown files for all content (i.e. blog posts, books read, etc.) and I would then use GraphQL to query through and render the content. This tried and tested formula worked well enough, and I used countless blogs such as this one to get it all setup and running with very little hiccups. However, whenever I had to update my “bookshelf” or write a new blog post (once in a blue moon), I would have to make changes to my actual website repo and push those changes through and although that wasn’t difficult to do, it added just enough friction to delay pushing much content out. Moreso, I could never just quickly jot down some random thoughts and publish those on the site without having to pull out my laptop. At some point I even thought of setting up automation so that I can text my thoughts to a sever that I’d have setup in my apartment which would then update the website but that honestly felt so 2010.
Notion
That’s when I realized that the same platform I use to organize my entire life could be used as the “realtime db” for my blog/bookshelf/random thoughts for the website. It would just be fetching and rendering the content through the Notion API and thanks to Next JS’s ISR support, I would be able to serve updated static content without having to rebuild the entire site. And so low and behold this new website, which is just a very basic Next JS site with notion as the content backend. The crux of all this is just 2 different databases (for the blog posts and bookshelf) and one page (for my random thoughts) that I’m fetching from. If you’re curious how all this plays together, check out the Github repo here and feel free to fork.
Cheers!