How not to write a blog
By convention, the first post in a blog has to be about the blog, and how awesome the author is for deciding to write one .
Why even write a blog?
This site has been up for quite a while in various forms and under various domains since somewhere around 2014. (Is it still the same site?) The most amusing versions of it have sadly been swallowed by the seas of time, to depths even the internet archive can not reach.
The content, roughly, has always been the same, and not much was added to it over time. I've always toyed with the idea of writing articles, but my own reason for doing so never satisfied me. I had some vague hopes of a blog eventually leading to fame, like anyone remotely related to the field of computer science that decides to write a blog. As you might expect, that's not a very good reason to start a blog, and I didn't want to end up doing the same thing as all the influencers out there. Kill me if I ever post a picture of my food.
After thinking a long while about why I wanted to write a blog, I realized there are three good reasons to do so:
- It's just a good way to contribute to the open web by creating literally anything.
- It's also a great way to actually learn about the topics you thought you were knowledgeable about, by forcing you to put it into words.
- It's a good way to let people know what you feel strongly about, and to connect with likeminded people.
An alleged scientific discovery has no merit unless it can be explained to a barmaid.
- Lord Rutherford of Nelson (probably)
I could proceed to write about how I spent years collecting ideas for blog posts and designing optimal workflows for blogging and have now finally emerged from basement to put my masterwork out into the world, when the truth is just that starting out is hard. Even if you do start out, writing is a whole discipline in itself, and the difference between having a blog and posting on it very grand.
The biggest hurdle, for me, was knowing that most of the things I imagined writing about are not things that I find valuable sharing. I also knew, however, that one needs to start small and build from there. Good posts come after bad posts. Good projects come after bad projects. So while this post doesn't have much information in it worth sharing,
All the technical details
Did you know that a kitten dies every time your site takes more than 3 seconds to load on mobile? I didn't either, so it's probably not true. Nonetheless, the web is bloated and the why of it has been covered thoroughly . Recently there's been a lot of hype surrounding the second coming of the lightweight web powered by static site generators and headless CMSs. The basic concept applies: you don't need a lot of JS or any backend code if you just want a place to share your cat pictures. Shocking, I know.
Some of these solutions are nice and simple (like Jekyll). They allow you to write some HTML and CSS and integrate it with whatever content source you want. Then there are more hypocritical solutions (like Next.JS, NuxtJS, and Gatsby) that make it easy to pre-render a full-fledged React or Vue app. A lot of people use React or Vue already and are comfortable with the syntax, so they choose to go for these more powerful frameworks. There is nothing wrong with that, really, but sometimes I wonder if that fancy hamburger menu is worth shipping 300kB of JS for. The page load usually isn't blocked by it so it probably doesn't matter. Hypocritical person that I am, I made this page using Nuxt.js.
Person 1: What are your thoughts on performance? I heard it's super important for making sites more user friendly.
Person 2: You're talking about Performance.JS, right? Yeah it's just 72kB gzipped and the added animations make my blog feel so much faster.
- My darkest nightmares
Why an external CMS?
If you have a cool project or write a new blog post, you usually want to do more with the content than just put it on your site. Maybe you want to tweet about it, update a profile somewhere, etc. With a CMS, you, for example, auto-update your github profile page with links to your newest blog posts.
If that's not something you care about, you might as well use Netlify's CMS or just keep all your blogposts as individual files in your git repo. Technically you can still use that to trigger webhooks and update external resources, it's just a tiny bit more complicated.
Blogs usually have a lot of features that lots of people use. Tracking, social integration, comment sections, etc. which you might want to integrate into your own blog too. Traditional CMSs like Wordpress have figured this all out before the dinosaurs went extinct, but external (headless) CMSs don't directly provide this. So why not go for a traditional CMS? Hosting one is either more complicated or more expensive, and most of the features listed above can also be added to static sites if you don't mind a little extra JS.
Personally I'm too lazy to track my users or the number of them, so I went the path of least resistance and cost.
- Posts are written in a markdown editor, I use Typora.
- They are put into a headless CMS, I use Contentful.
- The code is hosted on Github, I use a Nuxt.js project.
- The site is hosted on a free Netlify account.
- Changing a post in the CMS sends a webhook to Netlify, causing it to re-build the blog based on the Github repo.
What kind of content can you expect?
Expect nothing. But my interests are in
- Software engineering and technology
- Language learning and education
- Rock climbing and other sports
- Chinese and Japanese culture
so there may or may not be any posts about those topics in the future.