TLDR
I created a blog publishing framework built on XSLT. You can see it at https://xsltblogdemo.vgr.land/ and get the source here https://github.com/vgr-land/vgr-xslt-blog-framework
Introduction
Why build my own web publishing framework? It doesn't make any sense to do so. There are enough web frameworks out there to last everyone the rest of time. I wrote this for me. Once I learned the simple flow of XSLT driven site development I realized I was able to get what I want with little effort and a bunch of vibe coding prompts
This all started when somebody sent me some cool code. I wanted to update my blog template for years, but couldn't be bothered to figure out what's latest in web development frameworks. I learned about XSLT at about the same time I came up with a few new articles to write. This timing created the perfect environment for yak shaving. Thus, before I publish new blog posts, I need to update my blog framework. Before I publish my blog framework, I need to write the framework so it's reusable... and so forth.
What do I want in a framework Turns out, quite a bit.
Raw HTML authoring I have no desire to have a What you see is what you get (WYSIWYG) interface. Also I fucking hate WordPress. I've been writing HTML since 3.2 and at this point when I think of content publishing I think in HTML. This also means I don't want a markdown framework either which seems to be in vogue for most computer toucher blog writers I know. I've played with a number of markdown to web publishing tools and none of them really do what I want.
Automated RSS One of the things I didn't like about bootstrap was it wasn't a content publishing platform. It did a lot of the format and layout things I liked but it didn't do RSS out of the box.
Write once apply everywhere CSS and Bootstrap did a good enough job here where it was my go to for almost a decade. The template I was using was showing its age however. I had been making minor modifications to it for years and each new blog required me to copy and paste tweaks. New tweaks didn't apply consistently across old sites. I broke my hamburger menu.
Reasonable ability to use javascript I know in the smol web movement there's a desire to avoid javascript. I respect it, greatly. I was a noscript user for many years. I like to use minimal javascript for things like image handling and color themes.
Why XSLT
Building an XSLT blog template started as a vibe coding joke. Once I got started I thought it was pretty amazing that I was able to use a 20 year old standard to build a site in modern browsers. As I went further into the standard I came to appreciate its simplicity.
Simplicity One file that builds the site and contains all of the templates. It uses XML, while not as trendy as YAML, TOML, etc its simple enough. Additionally, some of the core internet standards are based on XML, like RSS. This allows me to keep a blog index written in XML to build menus and also reuse that file for RSS. Now, to publish a new blog post I do two things. I create a new post, and I update the index. Once I upload those files to the site, XSLT and your browser do the rest. No fancy build pipeline, no server side scripting, just write a file, update the index, done.
So what exactly is XSLT
The best techncial explination of the XSL language is written here: https://www.w3schools.com/xml/xsl_transformation.asp. How a browser engine renders it is explained here: https://developer.mozilla.org/en-US/docs/Web/XML/XSLT/Guides/Transforming_XML_with_XSLT. Rather than attempt to rewrite well written documents, I'll pull some key quotes from Mozilla
The separation of content and presentation is a key design feature of XML. The structure of an XML document is designed to reflect and clarify important relationships among the individual aspects of the content itself, unhindered by a need to provide any indication about how this data should eventually be presented.
XSLT allows a stylesheet author to transform a primary XML document in two significant ways: manipulating and sorting the content, including a wholesale reordering of it if so desired, and transforming the content into a different format (and in the case of Firefox, the focus is on converting it on the fly into HTML which can then be displayed by the browser).
The XSLT transformation engine, called the processor, does not work directly on documents. Before transformation can take place, the primary XML document(s) and the stylesheet document(s) must be run through a parser, which creates an abstract representation of the structure of the document in memory. This representation, called the tree, is what is actually manipulated by the processor. The tree is an abstract datatype, a conceptual model which can be implemented in various ways depending on the parser and the processor. :Netscape's uses a structure similar to the W3C DOM as its tree structure, but others are possible. The only requirements concern the disposition of objects in the tree, their properties, and their relationships.
XSLT and a Blog Framework
In short, the reason XSLT works so well as a blog framework is because of the split of the presentation layer and content. It allows the author to focus on content, while the framework handles presentation. This includes buidling navigation menus.
This blog framework generates menus based on two attributes in the blog index, date and category. This leans into the core strength of XSLT, the ability to process a document and render it in the browser which is the XSLT transformation engine.
The code that builds menus dynamicly based on the xml index relies on xsl:for-each, xsl:when, xsl:sort, and xsl:variable
By combining these functions you can dynamicly build menus without the need of javascript.
Future of XSLT
XSLT dates back to 1999, does it have a future? Maybe. Maybe not. Some people propose removing it https://github.com/whatwg/html/pull/11563. To me it doesn't matter because it works today. If support ends and it hits the dust of time, so be it.
Conclusion
I hope this blog framework helps others run their own blogs without being beholden to complicated build systems or templates. Its licensed under MIT so take it and make it yours!