With NotionCMS.Need we say more?
Not using NotionCMS?! It lets you effortlessly leverage your Notion database as a CMS.
Check it out here: https://www.agencykit.so/notion-cms/guide/
Okay, well it's pretty basic:
- Use NotionCMS
- Download this package
npm i -D ncms-plugin-segment
- Install the plugin
new NotionCMS({
databaseId: '...your db',
notionAPIKey: process.env.YOUR_KEY,
plugins: [
ncmsSegmentPlugin(),
]
})
- Use horizontal rules in your pages where you want to break into sections.
- Now your
ncms
page objects will have asections
property holding an array of all of your sections. - Sprinkle them around as you wish.
By default this plugin strips out the horizontal rules in the process but if you happen to want them in your html, set this to true
.