This is the dumbest blog framework possible, written in an archaic XML-based language.
Seriously. The W3C last talked about this technology in 2017. Except we're not using XSLT 3.0. We're using XSLT 1.0! from 1999.
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.
So, this framework probably works just fine. I mostly don't understand the inner workings of this framework because ChatGPT vibed with me for a few days... so I'm logging a bunch to console. Either way, you're welcome, and I'm sorry, for this. vgr
Demo - https://garbageblogframework.vgrsec.com
Code - https://github.com/vgrsec/vgr-xslt-garbage-blog-framework
For more info see FAQ
To use this framework for blogging:
-
Record a blog entry in
./content/posts.xml<item> <title>Last Blog Post</title> <description> I am Jack's XML Parser. I consume unclosed tags I kill jack. </description> <link>https://demo.vgrsec.com/content/posts/20250707.xml</link> <guid isPermaLink="false">post-20250707</guid> <pubDate>Mon, 7 Jul 2025 13:00:00 +0000</pubDate> <author>vgr.xsltgbf@example.com (vgr)</author> </item>
-
These fields populate the blog header. Make sure the date matches both the blog file name and the date inside the file.
-
Create a page in the directory
./content/pages/YYYYMMDD.xml -
Insert the following code:
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="../../xslt/site.xsl"?> <blogpost id="post-YYYYMMDD"> <content> </content> </blogpost>
-
The
idmust match the entry incontent. From there you can add any HTML code inside<content>. (maybe?)
If you get XML errors wrap the erroring code in CDATA
I did some testing. It seems to work. I don't use Chrome or Android so it might work outside Safari, Firefox, and the Mac ecosystem. Feel free to do a pull request if you find issues.
| Engine | Chrome (Blink) | Firefox (Gecko) | Safari (WebKit) | Edge (Blink) | Android WebView | iOS Safari |
|---|---|---|---|---|---|---|
| Support | 🤷 | ✅ | ✅ | 🤷 | 🤷 | ✅ |
This framework comes equipped with an "easy" to use theme engine. By default it comes with:
- Light Mode
- Dark Mode
- Hot Dog Stand
- OMG Pony
Add new themes by modifying ./xslt/site.xslt:
- You'll find options like
body.dark. To create a new theme, copy and paste a theme block, give your theme a newbody.$name. - Then update
console.log("Theme Script")and add your theme to the array of names. - Finally add a theme button inside
<aside class="sidebar">by copying an existing button and modifyingid="btn-$name",background:#, andfill:#.
Oh also I'm using a licensed font. input mono because frankly it's the perfect font and I love it. It's not licensed to you, and probably won't work. So you'll have to rip it out of the CSS...
Check out the premade template to see all of the different HTML tags in action with the theme. I probably covered everything in a 5 dollar bootstrap theme. Maybe not. who cares.
- Video: Buzz stepping onto the moon
- Audio: Lady Gaga sings the anthem
Added tag support for blog post.
Typo and CSS fixes
Initial Launch
