I’ve migrated my blog to Notion

I’ve moved this blog to Notion from Collected Notes.

I’ve been having problems with the new version of the Collected Notes API, and I’ve been wanting to extend and adapt some new functionalities.

Why blog with Notion

Notion allows me to upgrade the post type as I want; it gives me all the freedom I need. It’s perfect in that regard, even though the writing experience is not ideal.

I’m already using Notion for many other sections of the site, like the Games section, so it makes sense to consolidate more content in it since it will make the code simpler to maintain.

How to Migrate a Markdown Blog to Notion

The migration has not been perfect but has not been very complicated.

Collected Notes allows the use of the API to request all your blog posts.

I’ve used that API response to generate a CSV file that you can import to Notion.

The body of the post is a column of the CSV, which translates to a property in Notion. That’s not ideal, since what I want is to use the document contents as the body of the post, not a property. That would make writing in Notion a real pain.

Using the API to Migrate a Property to the Notion Document Body

I’ve managed to create a script to request every post in the blog database, parse the markdown body, and transform it into a valid Notion block payload. That updates the content of the document body instead of the property body.

Migrating the Blog Library from Collected Notes to Notion

The last step is to update the data layer from the code, which is easy since all the functions to request the data are encapsulated in their own library in the blog, making it easy to switch.

How is it going?

I plan to make some more tooling for a faster publication workflow.

In the meantime, I’m glad for the switch. The new Notion Layouts functionality allows to hide properties which are not indispensable or that are automatically created.

I can now use templates for different post types, and add tags, categories, or relations as I want.

Also, I use a third party renderer for Notion which is as extensible as I want, while covering new content types without my intervention, all while using the official Notion API responses.

Overall I think moving to Notion is good for the moment. We’ll see if the change lasts long.