shreshthmohan / next-blog

next-blog-mu-three.vercel.app
2 stars 0 forks source link

GitHub issues as CMS #13

Closed shreshthmohan closed 2 years ago

shreshthmohan commented 2 years ago

Why (tl;dr: reducing friction)

My blog was earlier built on Hugo. If I had to write a new post, I had to jump through a few hoops to get started writing a new post. (login to my laptop, cd into the local clone of my blog repo, hugo new post, write out the article, hugo serve to preview, then push it upstream)

When I transitioned to building a next.js based blog (/site) the process remained quite the same. Then I came across Shawn's ... and realised I already was writing a lot in my github project's issues, so this will reduce the friction in writing and also take away the limitation of having to be on my own machine to write a new post. I could write a post on my phone via the Github mobile app ...

https://github.com/sw-yx/swyxkit/pull/9/commits/3a309d95275ae32bd311d71838ca36858b222eb6

https://github.com/sw-yx/swyxkit/commit/3a309d95275ae32bd311d71838ca36858b222eb6#diff-e52d7cbb53c2deb88bfe15cfc210a387853cf9f243172b6e2844bb88bc9743a3

https://blog.sairinjs.com/introducing-sairin

shreshthmohan commented 2 years ago

Get a new token here: https://github.com/settings/tokens/new (with full repo scope)

shreshthmohan commented 2 years ago

https://github.com/hashicorp/next-mdx-remote

https://github.com/djyde/sairin/tree/master/packages/core/src

shreshthmohan commented 2 years ago

Frontmatter

title: string, optional (fallback: issue title) description: string, optional (fallback: empty string?) slug: string, optional (fallback: slugified title) draft: string, optional tags? (later when you have more posts?) category? (later when you have more posts?) life? [evergree|shortlived]

Other values (pulled from GH issue meta)

createdAt updatedAt labels issueUrl