The 10 year blog platform
Tags: htmx, tailwindcss, webdev
Published: 2023-10-29 19:29:58

TLDR: I migrated all my posts to a shiny new, handrolled personal blog at [www.ersin.nz](https://www.ersin.nz/articles/10-year-blog-platform)

Ok I'm kidding. I may have been writing code for cash for ten years now, but this tiny platform has been the product of two weeks casually plugging away in my editor, in between looking after my 5 month old daughter and working full time on [starboard.nz](https://starboard.nz).

This blog exists for three reasons. I wanted to learn something new, liberate my data from the centralized blogging platforms, and experiment with SEO.

My goal is to build a platform that can last for 100 years.

So Buckle up, we're going deep.

Yea I know it's not going to be here for even a half century. I'm setting my sites long term, and I'll be happy if it lasts a quarter of that. Shoot for the moon, hit the outer atmosphere. Big goals are important, no?

My rationale is that making my blog tech so simple, so boring will let me finish and move on to the next thing. The biggest impediment to building a 100 year blog, is gaining the inertia to keep writing, and build an audience that can pull you towards continuing in your writing.

You are probably asking; Why not post on a major platform Ersin? Major platforms suck, they don't help me with distribution or gaining an audience, and they don't let me mess around with some code and learn something new! At least through this process I am getting to build and I'm learning something new at the same time.

Don't get me wrong, if you're already famous you probably should use a platform for posting your content. But I'm not there yet. I'm still building.

If you're not interested in running a $5 vm, you definitely shouldn't be doing this. If your life isn't spent in git, then you should run now. Stop reading! Go away!

Great, now the noobs have been filtered out, let's continue.

This blog has been back-filled with some things I have written over on dev.to. Not only is it important to bring my old stuff in to the future, it's important to keep my content rolling. When you are working on software, having real data is also amazing and gives you the best possible experience for design. Let's not spend our days looking at lorem ipsum boilerplate eh?

My old blogging platform helpfully provided a tool to export your data (thanks gdpr), and this comes in the form of a simple JSON structure, this let me build a little tool which converts old blogs to new blogs.

So what does a new blog look like? Glad you asked!

Blog posts are in hashicorp config language
The content is markdown
They can sit in a file under a folder and will automagically be loaded and embedded in to the binary.

```
page "render-massive-lists-on-the-web-2h3c-temp-slug-7179880" {
    title = "Render massive lists on the web"
    description = "Rendering a huge list is almost never the right solution, but this post is here to help you out if it..."
    keywords = ["javascript"]
    content = <<EOT
Rendering a huge list is almost never the right solution, but this post is here to help you out if it is, and you want to do it as fast as possible.
EOT
  posted = "2023/04/05"
}
```

I am aiming to avoid needing a database for this application. All the content will be in the git repo, and the fact that it uses HCL is more of a quirk in that I wanted to pique my interest of the language. In 2023 I have picked up terraform for the first time, and it's just so much better than writing YAML. I want to spend more time writing code than HCL, and hopefully the least amount of time writing YAML.

Let's be real, no one really likes the look of tailwind when they first pick it up. But after 4 years of skepticism, I'm all in on utility first CSS. Now I'm not the best at slicing and dicing boxes on the web, but I've been centering divs since float: was the best technology we had. Utility first CSS is something that has been sitting in the background for longer than tailwind has. Tailwind is having it's moment because the old way was too rigid. We can copy a design system and easily extend it to new patterns when using tailwind, that's much much harder with the old way.

HTMX is my other pick here. Right now I'm only using it in two places. We are boosting, which should result in a marginally faster click through for you. And we are building the subscribe/contact form using our dear htmx. A tool that is gaining huge popularity now, based on a technique that has been happening for about 33 years? I'm all about it htmx is old but gold.

If you've made it this far. Thanks for hanging! What can you expect in the future? More technical content, my goal with this blog is to help make you a better programmer, and give you some ingisht in to the mind of a decade experienced software engineer. If I'm smashing goals out of the park, I will post weekly, but at a minimum I will post something once a month. For now you can expect blog posts, source code releases and the infrequent real world meetup talk.

What's next? Well, after a really energizing session at the local rust meetup, I'm hoping to pickup my learning journey there. On another note, I have countless dead projects that might be worth a deep dive. Or we could dive in to the real world of software development, and maybe I could answer a reader question.

Thanks for hanging!