New Blog Site

2022-02-03 Simon Liang

I have been slacking off a lot on writing (or producing content in general since I also make videos now) for the past few years. There is a lot I can write about - how we got to top 1% on Upwork, how we work as a multi-lingual remote team, how I prepped and passed my Elasticsearch Engineer Certification, etc.

If I have to give a reason for why I am not writing as much as I would like, I would blame the friction firing up a text editor, and editing content on my laptop with Markdown. Everything about this process drives me away from writing. Also I do get an urge to write code if I am firing up the IDE and this static site project. There is so much I want to change every time I saw the code I wrote 5-6 years ago when I didn’t know any better about CSS and just grabbed something that looked clean and make hacks / tweaks on it.

I know it is a lame excuse, and admittedly I do want to write when I am on my phone, so a good mobile editor and a site that can mirror the content and generate static HTML will be the best combo I can dream of.

There are a lot of options out there, but I believe these two tools combined is the best option:

  • Notion (with API)
  • NextJS

Actually I have been obsessed by this idea about 2 years ago when I first started using Notion and NextJS for my freelancing work, but at the time there wasn’t the Notion API or static generation in NextJS to achieve the perfect setup. But these features eventually came, so I took the time over the Chinese New Year holiday to build out my dream blog.

And Voila! I now have the ability to write on Notion and this NextJS site deployed on Vercel will periodically fetch updates upon incoming traffic (web scraper counts!). There is a great project called notion-to-md that can convert the Notion API block objects into Markdown, and I use markdown-it to render into HTML. The site is styled using TailwindCSS so it is flexible to make tweaks later on, making it fancier over time if I want to.

I spent a total of 3 hours building the site, including migrating my highest searched articles (including redirects), adding back the Disqus Widget, as well as finally getting around to add Google Analytics into the blog site. There are definitely more SEO features I can add, but for now I am going to leave it as-is and see how it works once the search engine picks up the new site.

However, a lot of legwork was done when I built the Chinese equivalent blog sites lately:

  • feishu-blog (Feishu 飞书, is built by ByteDance, the company which owns Tik Tok, also known as the Lark Suite, think Microsoft Teams in China. Feishu)
  • yuque-blog (yuque 语雀 is a product by Alibaba that is similar to Notion and focused on writing articles, documentation, wiki, etc)

These are good alternatives to Notion in China with API access sooner than Notion. I also write down pros and cons for these platforms in terms of using it as a CMS on the demo sites.

At the end, I am sharing the GitHub repository for the source code here, for the curious souls on the Internet. And I will definitely try to pick up the habit of writing and producing more content on the Internet.

https://github.com/lhr0909/notion-blog