This is just a quick ramble about the tech behind this blog - I think I was already installing this before I realised what a cool idea it’d be to have a blog.
Astro! 🚀
This is how these blog posts are written:
---
title: Blog tech
publishDate: 26 December 2022
description: How I made this blog
tags: ["tech"]
---
## Astro! 🚀
This is how these blog posts are written:
[ ... ]
That’s all I need to do! Now that I’ve set the design of everything, I can just write the content. And it’s all text-based. I can write it with or without WiFi, with whatever text editors I want, then just run:
git add -A && git commit -m "New post" && git push
and the new post will be added to this website.
This is all using an SSG tool called Astro and a theme
called “astro cactus”
that I’ve modified a wee bit.
Website hosting is free with Cloudflare Pages
(free CDN, HTTPS and basically unlimited bandwidth!!). This leaves the domain with the
only cost in the whole equation - These are between $3 and $80/year depending on the extension and
Cloudflare will actually give you a free one if you don’t mind the ‘.pages.dev’ ending.
I realise I could pay nothing and get a free blog with one of a hundred providers, most notably Blogger by Google, which I’d recommend to non-geeks. But I get to use open-source software with Markdown (will link to posts about these when I write them), I can write it up in plain text without having to deal with Word’s glitchy formatting and , I don’t even need to touch the web browser to manage the blog, and because this is a custom set-up, I can customise it completely.
One of the features so far is an RSS feed for the site. This shows machine-readable details of posts so people can subscribe with, or even view from, RSS readers. subscribing shows how you can do this.
Someone said on a ycombinator discussion:
The other thing that tends to happen with SSGs is that it can be a lot more fun to play around with the tech than actually writing blog posts!
Which I feel is the trap I’m falling into. So alongside the posts, you might just see me experimenting with features on the website. Perhaps I’ll add a comments section (Cloudflare has an awesome serverless solution I’d use for this).
For any developers out there:
I shopped around a ton to figure out which of these to use. It seems like there’s one for each language: Hugo for Go, Jekyll for Ruby (probably the biggest two), Zola for Rust, Pelican for Python, Grav for PHP and expectedly a dozen for Javascript - Astro, Eleventy, Hexo being the biggest. I narrowed it down to Astro because the usage has shot up in comparison with the other SSGs, I figure JS will be easiest to customise, you can use any JS framework for templating and it sounds like it has some of the top site optimisation methods.