homepostsrésumé

🗼 Building this blog with Notion, NextJS, and Gitpod

March 10, 2022 at 12:00 AM

🍿 Credits and Callouts

Everyone stands on the shoulders of giants here:

  • Samuel Kraft’s blog on “Building a blog with Notions Public API” finally got me to scratch the itch of converting a massive amount of content I have stored in notion into a public / shared format.
  • Maximous Black’s comment on that blog source got me thinking a little more correctly about processing the blog post as data before rendering it (🤯 that they happened to be working on this all at the same time)
  • notion-x used the uncomments system which let me to giscus
  • gitpod’s unbelievably fast prototyping ability
  • Fonts: Atkinson Hyperlegible

starting with https://github.com/gitpod-io/template-nextjs

  • open in gitpod
  • add a “hello world”
  • you now have a functional gitpod-enabled nextjs repo!

enable access to the notion API! following along this blog, we’ll need to:

  1. set up notion API access
  1. create a notion database (…)
  1. commit lib access to blog and a blog landing page (at some point this may fail the localhost preview)
  1. add a command to .gitpod.yml to populate the .env.local file during dev (based on this guide)
  1. open a PR, and re-start a gitpod workspace from the above ^^
  1. implement basic “load blocks” page

build a more robust parser / loading mechanism

  1. this was part of https://github.com/samuelkraft/notion-blog-nextjs/issues/17

... discover that you need to fill in a great many components.

☕ built in boston