Hacker News new | ask | show | jobs
by raajg 1073 days ago
I've tried so many different stacks over the years but I always ended up in the same cycle:

- Spend a lot of time finalizing the stack

- Spend a lot of time styling the new blog

- Migrate some of the posts from the old stack to the new stack

- Write a 1-2 new posts in the new blog

- Stop writing

- After a few months, I come back to writing a post and realize there are dependencies to upgrade, scripts to run, and what not. I give up for at least a year.

After 10 years of having gone into this cycle over and over again, I'm currently using the following setup:

- IA Writer -> Gitlab -> Cloudflare pages

To write a new post, I just have to create a new file in IA Writer and save it. That's all.

A bare bones shell script blog.sh converts markdown into HTML (locally on my mac), invokes git push to Gitlab. And there's a 'Pages' project in Cloudflare which listens to changes to my Gitlab repo, and just statically publishes whatever's in the 'site' directory.

I've written more posts in this new stack than ever before. And I think the best part is that I just need to 'create new file' and 'save'.

4 comments

> After a few months, I come back to writing a post and realize there are dependencies to upgrade, scripts to run, and what not. I give up for at least a year.

What dependencies? If it's just a matter of simple html and css, why not just run a minimal configuration of apache or nginx? Publishing from markdown is not part of your stack. It's your publishing process and independent of the hosting.

I don't think they are complaining about the hosting, but the publication process being brittle.

For example, I use pelican (pretty much 'what if jekyll but in python and more flexible'), and found that every time i wanted to update my site there was a problem with some unmaintained plugin not working with the latest python standard library, or similar.

It's also easy to set up what feels like good process for publishing, only to find that it wasn't as well documented or obvious as you thought the next time around. This is natural for anything semi-complicated that you only do once every 6 months, when you're really trying to get something else done (writing the damn content).

If you already know how to use it, nix is a good solution to this, as you can pin all dependencies (including languages and external tools), and they will still be there and working in a few years.

What if you also didn't use plugins, but a simple script that appends <section> tags to your blog's "index.html" and chunks and links them into whatever number of those you want per page? It's a blog after all. I agree it should be simple. I haven't met a blog "framework"/"platform" I didn't hate from the moment I saw it. Maybe I'm a dinosaur, but this seems trivial. Write this in whatever language you want.
Yeah what I ended up doing was just writing plain HTML files directly in a text editor and hosting everything as plain old static files on my Synology NAS on my home internet connection. Works fine for what I need.
May as well push them up to Github Pages. It's free, source controlled, won't go down if you get a spike in traffic, and most importantly doesn't expose your Synology NAS to the internet which has resulted in many security compromises over the years.
Thanks for the post, I will attempt a similar thing using PowerShell.
Cool, care to share your blog?