A little/big site update. The little is that functionally the site is near identical to how it was since last week. The big is that instead of using Zoner I now use KZone to generate the blog.
KZone is a static site generator that I’ve made in Construct3. Designed to tackle a few key problems I was personally having with Zoner.
Zoner is a great tool that did what I wanted it to, which was get me started blogging. Now that I’m being more regular with my posts I’ve noticed a few things I would want to work differently, and figured that it would be easier to make the effort of moving over while there are relatively few posts to convert.
I wanted more control over file organisation. Zoner is awesome in its simplicity, you have an images and post folder.
The problem for me was that it wanted everything in these two big buckets. Putting images inside of sub-folders would stop them from being included in the built site, and I don’t know if this is intentional but putting posts inside of their own subfolders would cause all posts to not build. This is totally understandable, the goal is to keep thing simple and get a site up and running quickly, but I want that level of control.
I wanted to move away from some of the Markdown. Markdown is great, but I was finding that due to how it works I was often writing out code manually which was slowing me down more than speeding me up.
Two of the most common things I want to do is make a link or post an image. In Markdown a link is a simple [LINK TEXT](LINK URL), but a problem for me was that I had no control over the target. Something I want to do is have all links that point internally open in the same tab, while URL’s that point externally open in a new tab.
Markdown doesn’t support that kind of granularity, so I swapped it over to my own ["LINK TEXT" "LINK URL" "OPTIONAL TARGET"]. Now it detects whether the URL is internal or not, as well as giving me the option to force it one way or the other. You can see now that any of the links on site that point to another site will open in a new tab, and I don’t have to worry about writing another <a href="URL"> again.
When it comes to images, I often want to include a caption. Nothing too complicated just a couple of <small> and <center> tags after the usual markdown, but now I can include it all in the same style as links. ["ALT TEXT" "IMAGE URL" "OPTIONAL CAPTION TEXT"] and KZone will handle that all for me!
The rest of the markdown I regularly use works as intended:
This is markdown adjacent, but post titles and dates were based off of file names. This meant that if I couldn’t have a title that used Quotation(") or Question(?) marks as they’re illegal characters for files. Now I set all the necessary information inside of the post files, this includes titles, dates, and templates etc.
Zoner uses a separate header and footer file for formatting a page, which I like. When I came to setting it up though, I decided that I would instead replace them with full page templates. Each post reference the template it wants to use, and is generated using that particular template. So posts use a PostTemplate, which includes the Previous and Next post navigation in the footer. This means that in the future if I want a specific page to look unique all I have to do is pop in a new page template and reference it!
Speaking of Previous and Next posts, and this is a nitpick, I reversed the order. It's always felt weird to have the previous post option on the right, instead of the left.
This was the real sticking point for me. Zoner generates an RSS feed but only includes the first paragraph of any post.
Personally, I want my site set up so that if someone has an RSS reader they like, they can read all new posts without ever actually visiting. I want to display the entire post, including images, links, iframes etc.
Obviously how much will work comes down to specific readers, and I appreciate that most people want others to visit their sites as opposed to aggregating it all in one location, but I don’t mind! I have set this up, and done some limited testing, but at least in Miniflux it should now be possible to follow the feed and enjoy all posts entirely in the reader.
So super, it’s all working, but why not edit Zoner? After all, the source code is available, and entirely open source.
Which yes, good point. I don’t have a good reason really, I’m not a great programmer, relying on various visual scripters ninety nine percent of the time, so I suppose that would get in the way, but also… I wanted to tackle it myself! I’ve never programmed a static site generator before, and now I have. It’s neat!
An added benefit is that since I made it in Construct, it can run in the browser too. Meaning that if I’ve got my hands on the source, technically I can build the website from anywhere with access to a browser. I plan on sticking it online eventually when it’s a little more functional, as it was a bit of a rush job to get this ready for today!
I don’t want this to come off as a Zoner bashing post. It’s rad. It’s also pretty likely that I could have done all of the things I’ve made changes for, and didn’t know precisely how to do them, but I’m otherwise happy I’ve sorted this out myself. Now implementing anything new will be easier and entirely in my hands!