Notion as a CMS
planningIn my planning for April - one of my goals was to use Notion as a CMS for this blog.
I chose Notion because it is an integral part of my daily workflow, both for my personal work and day job. (I have a project in the works that will convert my daily notes from obsidian.md to Notion.)
Before doing anything, I'd like to write up 2 things:
- Alternatives (none of which I am going to use, because I want to scratch an itch, but it is still useful to take a look at what exists).
- Use cases and constraints for the tool.
Alternatives #
This blog is built with 11ty.
Alternative 1: The current approach #
The current "CMS" I use is the following:
- Write drafts in Notion.
- Edit in Notion.
- Export as Markdown.
- Push to a private repository.
- A build trigger on Netlify is tripped which kicks off a redeployment and updates this blog.
Alternative 2: Strapi #
A quick google search for "11ty CMS" returns Strapi.io.
Strapi seems to be a headless CMS that you can couple with a number of integrations to get "out of the box" support for a fairly robust CMS.
Strapi is open source and has the option to self-host. This seems reasonable and probably a strong contender for a solution.
However, it does add a layer of complexity and lives outside my current tooling. It does also sound like too much for the use case I have.
Admittedly, this is where I stopped my alternative research.
Use Cases & Constraints #
I have a few use cases and features that I want to support with this build:
- I want to write articles in Notion.
- I want to publish articles through Notion when I am ready through a single click.
- I want to unpublish articles at will, with a single click.
- I want to revise articles that are already live.
- I want to synchronize any existing articles on sequential.dev into Notion.
- I want an opinionated format and database structure on Notion. (TBD)
Additionally, there are a few technical/nice-to-have requirements I want to have:
- The CMS tool should update a private GH repository with changes made on Notion.
- The CMS tool should offer 2-way synchronization, that is, a change on Notion is reflected in the repository, and a change in the repository, is reflected on Notion.
- The CMS tool should maintain a write-only log on all changes, this log should be accessible in Notion.
- The CMS tool should support saving drafts to both Notion and the Git repository.
- The CMS tool should support images.
- The CMS tool should be hosted and accessible through cms.sequential.dev and have it be protected by authentication.
- cms.sequential.dev/new should redirect to a blank Notion page for a new draft.
- Should catastrophe befall both Notion and Github, I should be able to restore the entirety of my CMS and blog with a single command.
- Ideally, I'd like to have a Google Chrome plugin that allows the one click publishing, if not, cms.sequential.dev can house that functionality.
That is all for now!
- Next: Working in public with teams
- Previous: Capturing DOM events