Work Journals

  • Long week

    It's been a long week that I can barely make progress on Notion CMS and all other works, not to mention that I had already been struggling on how to design Notion CMS right. Thankfully, I think I have figured out the direction which makes sense to myself today.

    I had always considered Notion CMS to be just a wrapper to Notion API that fetches everything every time it is run, and now I have decided to make it more like Netlify CMS, which eventually produces files, instead of just data.

  • It had been like underwater diving

    Have been visiting my parents last weekend, it has been almost three months since the eventually covid outbroke here in Taiwan. Kids had had to stay at home, and it resulted in that I can barely work in good conditions.

    I feel building stuff is like underwater diving (I don't really know it at all), it takes time to get into the flow. Whenever you are interrupted, you are forced to surface, and it takes a whole lot of time to get back to where you were.

    So notioncms.dev has been up and running, though I am still working on the content. In order to open source Notion CMS, I have to add features that I don't use myself. I am not sure if it is the right choice, but I'll try to limit the scope and make it shareable ASAP.

  • Meta

    Have been writing content for the sample website which will also be the landing page for Notion CMS today. It is kind of meta, I am building Notion CMS's landing page using Notion CMS.

    Got a bit distracted today. I have registered a new domain name, and I thought I'll probably recv and send emails using the domain someday. I don't want to setup another Google Workspace, so I ended up spending a while tinkering with my Postfix server for SRS and SASL.

    Notion CMS landing page content

  • Update

    Have kept working on the sample website for Notion CMS today. What I thought was hacky to pull in content to Eleventy is actually the better way to do it. It forces me to separate layout and content, which is actually what makes a CMS a CMS.

    I am targeting to ship the sample website tomorrow, and have the notion-cms package updated.

  • Weighing the options

    Have been working on a Eleventy sample website to showcase Notion CMS today. There are two ways to pull in content from the outside, one is sort of hacky and limited, the other is sort of detouring.

    I find myself constantly be in the situation of wanting to use a tool differently to how it was designed in the first place without knowing that, and found out about it after digging deeper to the fundamentals. I guess this is just how my brain works.

  • Not much progress

    Just like the good ol' saying - "Starting things are easy, finishing them are the hard part." The straight forward parts of Notion CMS for me are done, now comes the tedious and unfamiliar parts, fixing bugs, improvements, marketing, and etc.

    I am thinking of using Tailwind CSS for the mandatory styling part of Notion CMS. It is kind of making it an opinionated library, but I think it makes it easier to use.

    super.so has constantly come up my mind recently, as it is doing something like Notion CMS, but much better, and way earlier before Notion released the API. I guess it crawls user's notion pages since it requires user to share the pages publicly. Maybe I should just do the same.

  • First user

    🎉 My commonplace book is now powered by Notion! It is using the notion-cms NPM package which I created to use Notion as a content management system for websites built with static site generators.

    I jot down takeaways from inspiring podcasts, videos, and blogs on my website, but oftentimes I don't have access to my computer while I am listening to podcasts.

    Notion released its API a while ago, and it make sense to just use the popular tool to write down thoughts, and have them automatically got processed into my website. And I thought, "Why not just make a tool that every one can use?".

    notion-cms is currently crafted in the way that it fits my needs. I'll share it around and see how people could find it useful.

  • Almost there

    So the Notion CMS NodeJS package is just one feature away before I can use it on my website. I think I can share the repo tomorrow if things go well, and some showcases and articles after that.

    Played around with jest for a while today, I wonder if it is that the document does not make it clear how to mock a Node class module, or is it just me.

  • Need just some more work

    JavaScript module is a mess, but on the other hand mind-blowing that the language still rule the world. To make a NPM package support both ESM and CJS module, you have to write the main code base in CJS with a thin layer of ES6 along side, the other way around doesn't work.

    Figured out the proper way to integrate the library into Eleventy, need to propagate some metadata from Notion API and handle pagination before it becomes usable. Working on these stuff truly brings back the days building KKBOX Open API.

  • Had a basic prototype

    Had a basic NodeJS script that turn pages in a Notion database into HTML documents. There are a lot of missing pieces now for sure, but at least it is a start. I want to turn it into a more general tool, but I don't have specific ideas for now.

    I'm wrapping it up into a NPM package, will try it on my commonplacebook and hopefully will able to publish the package tomorrow.

  • Depth-First Searching the Notion

    Keep working on the NodeJS code to convert Notion API's response into HTML, it is all about depth-first searching the tree. The idea to have children for each block is something that cannot be directly trasnlate into HTML, I guess I'll need to use CSS to visualize the structure.

    I think I can start integrate it into Eleventy tomorrow.

  • Initial Commit

    Started to play around with Notion's beta API a few days ago. It feels like a great fit to jot down my commonplace book content in Notion, and use the API to pull content into my blog. Yes, just like a CMS.

    Here's what I've done so far

    • Created a Open API spec for Notion's API
    • Started writing some NodeJS code to generate HTML from API response