How I Use Notion as a CMS (with Next JS)
HTML-код
- Опубликовано: 22 ноя 2023
- Relevant resources :
The Notion template: affiliate.notion.so/my-notion...
My Next JS code (Work in progress !): github.com/Kodaps/gradient-as...
The Notion parse NPM module: www.npmjs.com/package/@kodaps...
The Notion Parse code: github.com/Kodaps/notion-parse
-------
I use Markdown to store the static content for my NextJS websites. There are many reasons why: it’s free, it’s open, it’s portable, it’s editable, and there is no buyer lock-in.
However, on my personal blog, I now have about 75 blog articles in both French and English. And it is becoming difficult to get that content correctly organised.
I’ve explained previously how I ensure that the data stored in the FrontMatter follows the right shape using an SDK called ContentLayer.
But is there a way to better organise it?
I want something trivial to set up. I want to be able to edit content on my phone when I’m commuting to work. I’ve tried different solutions, but I’ve settled on using Notion to track all my content.
If you don’t know Notion, it’s a free tool for organising your life. And it allows you to easily set up tables with custom fields. And that’s great for my content because each type of content has different fields. For example, I have a table for blog posts, one for pages, and one for newsletter issues (incidentally, I’ve provided a link in the description if you want to sign up).
The reason why Notion, Markdown and ContentLayer are a perfect fit for my use cases and my situation is because all three allow you to define your data schema in the content itself.
So, what happens when I want to update content? I run a script that downloads data from Notion and saves it as Markdown. I’ll explain how in a second.
So, how do we go about it? Well, allow me to walk you through the steps.
----
Want to go into further depth? Head to kodaps.dev/ - Наука
Awesome video man.. the quality is absolutely amazing.. can't wait to see you grow into a big channel
Thank you very much :)
Brilliant idea! It would be really helpful if you can create a tutorial on how to create a portfolio and control the projects, links, etc. with Notion as a database.
Thank you in advance!
That's ingenious! Never thought of using Notion as a CMS before, but with the strategy you're presenting it would be totally doable. Thanks for your work!
awesome solution, hope someone can teach, willing to pay
Man you are so amazing, I love you....! please don't stop you are doing a good job there! Thanks for all the amazing stuff...!
Glad you like the content :)
found this interesting and helpful. Thanks! you earned yourself a new sub!
Thanks, and welcome :)
but actually we dont want store md and images in project folder to make it super large, how do we resolve this?
Exactly where I am looking for. Would me amazing to see a full tutorial on how to build the blog and how to manage the content with notion and contentlayer!
This is not quite for a blog but the rest is there : ruclips.net/video/Hl7hSVRKKmw/видео.html
@@KodapsAcademy I do have some problems with parsing webp images from notion to contentlayer with the kodaps/notion-parse library. Can you add support for webp images?
Is not for the french public ? or i don't see this video on your french chanel ?
Do you try other CMS with NextJS ?
Not really a CMS but I tried using Ulysees for all my markdown content, because it's great as a writing tool. For the french public, the english one did not work so well so I did not bother putting it up mais je peux si ça vous intéresse :)
since you dont own the notion api, maybe it might break someday
True. But then that's why 1/ I coded the NPM moduie, it allows me to adapt and 2/ why I then download the content locally as Markdown files :)