Updates

Javascript and (b)log posts!

17 Jul 2024

Started making updates easier to maintain… hopefully. Read the details for the technical explanation lol.

One JSON file, many headaches

In the interest of making this site actually somewhat maintainable, I’ve decided to sprinkle in some javascript. Love it or hate it, it makes things easier for me. I refuse to use a static site generator (SSG) for this website, since it feels… less old web? To me at least haha.

Either way, I now have a single source of truth for my update log. Later I’ll do the exact same thing for my blog posts. This source of truth also happens to be a JSON file… which is less than ideal. But I can swap it out for a HTML source later on if I really feel like the JSON is too limiting.

You can even view the json here. It contains every single update, so it’s probably going to get really big over time.

The way this works is by fetching this JSON on the pages that display an update, or a list of updates. Then I use some very tedious javascript to fill in the page with this data. The singular update posts still fetch the whole list, it just filters for the one with the right URL. That’s exactly how this post works, actually!

That sounds like a lot of work

It’s honestly less work than it would be to update a bunch of pages separately. I’m going to be using javascript a lot more throughout this site though, using a similar setup. And now that I’ve got the foundation for fetching a list down, I can go ahead and expand upon that. The most tedious part by far is setting up the JS that manipulates the actual HTML. Once that’s done though, I can pretty much add as many blog posts as I want.

I’m going to use this for both the update log and the more personal/content-oriented blog. These two are separate, for some reason. Even though this particular update post would qualify as a blog post too :P

I’m also planning on using it for a couple of other things. Mainly system alter lists, since I want to use the data from that across multiple pages as well. But also things like OC lists and other creative works. Basically, if there’s a list, there probably will be JSON and javascript.


That’s about it for now, I have a lot of motivation to work on this site again so hopefully there’ll be more updates like this in the future!

© Fulmine 2024 - All Rights Reserved 🫐🐉