Hello, World!

Hello, World!

I wanted to show off document the way I am generating these blog pages. It's pretty cool! There are a couple parts to it.

How its done

First, I write the post in Obsidian, which is a really neat free note app. One of the core concepts of Obsidian is that all of your notes are just .md files stored locally on your computer. So I write a note, make sure to add slug and date properties, then I push that .md file to a private GitHub repo.

Then I use octokit.js to pull all of the files from that repo. For each file, I use markdown-it (and a front-matter plugin) to parse those slug and date properties and turn the rest of the markdown into HTML.

Why I do it this way

It would be a whole lot simpler if I just wrote the HTML myself and stored it as individual pages. But there are some benefits to this approach!

The main reason I do it is to avoid having to rebuild the entire site whenever I feel like yapping making a post. With this approach, the site itself and the posts are mostly decoupled.

That benefit also means that I don't have to be on my computer to make a blog post - all I need to do is push a markdown file to the repo, and it will appear on the site. There are probably refrigerators I could do that from!