cagov / odi-engineering

California Office of Digital Innovation engineering documentation
MIT License
2 stars 0 forks source link

Explore Notion as a CMS solution #78

Closed zakiya closed 2 years ago

zakiya commented 2 years ago

Notion API is designed as a simple backend structured data source. Since there's no simple way to access an entire page's contents, I don't think this viable solution for a rich-content backend like we had imagined.

Notes here: https://odi-dev-zk.notion.site/Notion-as-a-CMS-35f53c7f1b7c401ab0943c70d9051dd7

chachasikes commented 2 years ago

Thanks for trying out the API.

I see that the API produces block-by-block output. That's a bummer, as is it seems like it would be a little slow to pull data from & not optimized for clean output.

The API output looks similar to what Contentful provides for rich media blocks (I forget the exact name, but something like that)

For Contentful, there is an html rendering npm package that can translate the content back to renderable HTML.

I wonder if Notion's "page lock" feature could be set, and/or if we could request markdown format in the API.

Wonder if this is already an existing thread in Notion - it would be nice - but I wouldn't expect robust production ready packages to exist because Notion's API is in beta still. (Maybe in a year or two)

chachasikes commented 2 years ago

The alternative is to use the export with subpages to markdown & commit the folder (like @zakiya did with our design system docs) - but that's why we wanted the API in the first place - to see if this is automateable.

chachasikes commented 2 years ago

nevermind about page lock idea - i would expect that that feature just prevents interaction enough to allow a user to copy the page without activating all the editable regions

markdown data by API would be the dream feature