Blog posts tagged #meta

Another Blog CMS

#code, #meta

I haven't written anything here in a bit, and it's again because I've been fighting the tools.

I've gone through and converted this blog to use the Grav CMS, with a heavily-modified version of the Hypertext theme. I like it a lot more than previous attempts:

  • My first, from-scratch, git-based CMS. It did exactly what I told it to do, which was great but also sometimes a problem. Not having a web backend stunk.
  • The second, Automad-based system. Automad is great. But I couldn't bend the theming system to my will, and persistent permissions issues on the server prevented me from really using it. Likely PEBKAC but I couldn't get it to work.

This system feels better. Grav uses the Twig templating engine, and as I've made edits to the theme, I find myself filling the site with little curly braces. It's odd to have Twig get processed down to php, which then generates the actual html. You'd think it's not super efficient, but Grav also implements decent cacheing, so it works out all right.

I really hope this one works out. My other options are less desirable. There's always old reliable.

Twitter, Mastodon, and This Blog

#media, #meta

It's been a weird few months on the internet.

Elon bought Twitter, and started doing the sorts of things that a person like him would do. I initially stopped posting, and eventually stopped going there altogether. I don't miss it.

Part of why I don't miss it, though, is Mastodon. I wasn't on Twitter in the early days, but I am told that Mastodon currently feels like that. I really like it. Not having quote-tweets is a big part of that, as well as the algorithmic timeline that rewards outrage, makes it a much more pleasant place.

But jumping onto Mastodon has a cost – I basically don't write here anymore. I built this website so I'd have a place to put long-form content on the internet, and so I'd have a sort of home base. But my publishing workflow is pretty clunky. I write a text file with some metadata at the top, commit it to a git repository, then pull the changes on my server. Then I visit a special url, type in a code, and some php chews on all the text files and spits out a directory structure and html.

That works fine if I write stuff that my text parser can understand. But if it spits out garbage, or I need to fix typos, the whole thing falls over. It's not robust. I have resorted to writing drafts when ideas occur, then firing up a local copy on a LAMP stack on my home Mac to make sure there aren't any errors, and finally doing a dulpicate "real" publishing workflow. It's not exactly friction-free.

So instead, I just fire up one of several Mastodon apps on my phone and post something there. Easy edits, no worries about text parsing, and a small audience sees it. A 500-character limit and pre-posting threading makes long-ish form stuff easy, too.

So what do I do here? I tried hosting my own Mastodon instance so I'd own and control my own stuff, and gradually call that my micro-blog. But it's heavy enough software that I don't care to increase my server hosting costs by a factor of 2-3x just for a micro blog. Write Freely is another piece of software that can be self-hosted and implements ActivityPub, but I couldn't get it to work well on my server.

So maybe I install WordPress again. It's fine, I guess. But in earlier iterations of this site, it gave me nothing but headaches. There are other, more lightweight cms's out there. Might give one of them a shot.

In any case, this may be the last post using the current system. Building it was a fun project. But my day job isn't in software, and I don't have the skills or time to dedicate to making it actually good. It's probably time to rely on the professionals doing what they're good at.

Version Control

#meta, #code

I think it's finally time for me to learn git.

I have been writing code that goes out into the world (starting with NMR Solvent Peaks) for about five years now, and I'm not proud to say that I haven't been using any form of version control. Nothing I do is complex enough to really need it, and it's just me.

But that's not sustainable, obviously. If I'm ever on a team of people working on a project or if I don't trust my edits (and boy howdy should I not trust my edits sometimes) I'm going to need to get good at it.

So the plan is to put the contents of this blog under version control. The code should definitely be under version control, but I'm also going to use it to send new blog posts to the server. Regenerating all of the html files will start by pushing down edits and new files, then parsing and writing html. I'm going to host the repository at Github for now, since it's there and I can write (or paste) right in their text editor.

And if it all blows up, well, hopefully I can roll back.

Edit, some time later:

This post, and this edit, were both pushed to the server by using git. Success!

Edit 2, in January of 2023:

This system turned out to really stink.

Deciding on a URL


It's very difficult to choose a website url. But maybe the most important part is picking the .tld, because it says so much (intentional or not):

  • .com: what you really wanted, but it's $6000 (renews at $12/year, what a deal)
  • .net: relatively cool genX person blog
  • .me: relatively cool millennial blog
  • .co: fishing for typos
  • .tv: Youtuber not from Tuvalu
  • .fm: podcast not from the Federated States of Micronesia
  • .biz: big corporation internal site or SEO spam
  • .io: either a node package or a crypto bro
  • .xyz: definitely a crypto bro

Serial, not Parallel Projects

#code, #meta

I'm at the part of this blog engine project where I think I can see all the parts that need to be built, but they haven't been built yet. This is a dangerous place to be.

I have the Xcode 14 beta downloaded and ready to go. iOS 16 is calling. New SwiftUI functionality is making it harder not to just sit down and rewrite NMR Solvent Peaks from scratch. Maybe it'll be better this time? Or maybe it'll take longer to hit the brick wall of "you can't do that" functionality.

No, I will be strong. There are still plenty of lines of echo $blah to write.

Starting off Fresh


Here we go, post number 1.

I've tried the blog thing before, it never stuck. For a while in college I was using the old iWeb as a sort of journal, but that thing is lost to time. Later on, tried running a Wordpress blog, which actually went all right, but wasn't very exciting - save for one time when I criticized some guy's op-ed in Science, he got mad, and emailed me and my PI about it. I tried to reassure him that basically nobody read the thing, but, people-who-google-themselves will be how they are.

Chances are, this won't stick either. But this time, I'm writing it from scratch, so at least it'll be a fun programming project. Going to try the static site generator approach. Fill a folder full of text files with entries, run a command, and have it spit out a fully-formed html-only site. No comments or anything like that, which is a feature, not a bug.

I'm not even sure what to call the site. There are some options for inspiration, like qntm's Things of Interest, or Michael Tsai's blog without a name, or Daring Fireball. I'm not going to title it "untitled blog" or whatever. Probably going to end up being a cool word or two that doesn't already get a lot of search results.

First Post Please Ignore


If you're reading this, you've hit the end. Or the beginning. Yep.