I Made a Blog!

I Made a Blog!

Sam Bradley

I figured I’d start a blog.

I started by looking at different frameworks and tools to use to build it. Ideally I would be able to write all my posts in Markdown, push them to a Git repo, and have a GitHub Action automatically take care of deploying the updated content to a cloud host somewhere. After using Firebase for my HackUSU project, it seems like a good choice for this project too.

With a quick Google search I find that people seem to like Eleventy and Hugo. Hugo is written in Go, so it’s probably pretty quick, but I’m not super familiar with the language. Their Docs page has several layers of sections; intimdating! Let’s check out Eleventy…

OK, looks like Eleventy uses Node and I can install with NPM. That shouldn’t be hard, and their main site page has a quick start guide! Let’s give it a go.

After installing the package and trying some basic setup, this seems like it could be harder than I anticipated. Their docs have the opposite problem from Hugo: it’s hard to find things and they’re not very detailed. I did find an official blog starter repo that I could clone. I’ll delete my previous start and give that a go.

This starter project makes more sense, but it has a bunch of extra junk I don’t need to make it easier to deploy to Netlify, Vercel, etc. Not something I need. The page templating seems pretty familiar, looks similar to Jinja that I’ve used with Flask before. Definitely usable, but the tags are a little bit of a hassle every time. There also seem to be a lot of config files. For such a basic site, I’d think it would be a lot simpler. Maybe there’s something better? I really just want something that’s pretty vanilla web framework out-of-the-box with an easy way to render Markdown to HTML. Let’s do some deeper searching…

Astro? Hmm… I’ve heard about that before in a Fireship video maybe. Let’s take a look.

Note
This is a note. Maybe there’s a way to set up classes?

Hey, the tutorial in their docs is creating a blog! That’s convenient. This could be a good option as long as I don’t need to do anything too weird to get my Markdown articles to work. Nope! Seems to just take care of rendering it right out of the box. Beyond that it’s pretty similar to React, just with a lot cleaner syntax and less boilerplate for everything. I can set up some components, have it dynamically grab my blog posts, and be off to the races! The only part that seems annoying is classic CSS. I could import Tailwind or something else to help out, but for such a basic site I shouldn’t have too much trouble after the initial setup. Besides, I’ve gotten a lot better at styling recently. Let’s get started.

def test():
    print('Python function')