2026 Blaugust 02 - Fixing problems with my HTML
Published -
Okay, so I'm not off to a great start with Blaugust this year, I've not been sleeping very well and I've spent most evenings trying and failing to work on my next project. 🙁
To that ends, while I was doing some testing for my current CMS I realised that I haven't been including any <link rel="alternate">'s in my HTML. Making the feed discovery a pain. Sorry about that but someone should have told me I was being rubbish.
Anyway this prompted my to go fix it in myPOSSE-Builder, and wouldn't you know it I broke it.
Here's a tip for you after you implement a feature, update some libraries, or just change the logic in some inconsequential way, test your freaking code still works, and then commit it.
It took me all day yesterday to work out that what I needed to do was stop reusing the TemplateContext for Scriban. I had it as a global in my HtmlRepository class and something had changed somewhere in the execution chain. If I was parsing a Page object as apposed to a Post object calling _parser.Parse("base", templateContext); silently returned an empty string. 🤬
On the upside I did spen a bit of time fixing a load of HTML issues that I didn't know were there. Like
- DOCTYPE should be uppercase
- Attribute "lang" using unquoted value This one was due to the
MinifyHtmlfunction I was using, it was stripping the"'s from attributes all over the place. - Landmarks must have a non-empty and unique accessible name (aria-label or aria-labelledby) I have multiple
<nav>tags in my page so I need to label them. - Expected omitted end tag
<hr>instead of self-closing element<hr/>This also applies to<meta>,<br>,<link>, - Element id "" must not be empty Turns out that I have been missing the id from the
articlenodes in the homepage and the archive pages. Mainly because I hadn't added a slug property to thepageMetaobject 🫤 - Inline style is not allowed on
a,img,footer& apparentlyp <img>is missing required "alt" attribute Well, yes but I lazy… FINE! I'll fix the one I can find. 🙈- I had one place where I got the tag order wrong
<strong><em>bob</strong></em>but that was just an oversight on my part.
In short make sure you have an HTML Linter in your editor, if you use VS CodeCodium try HTML-Essentials All this so that I can make the site feeds more discoverable. Now if your feed reader supports discovery of feeds from an HTML page my site should work now.😉😇🤓
Song for the Post
I couldn't think of a song to fit with this post, so here's one that I get stuck in my head every now and then.
Toto - Africa (metal cover) • Leo Moracchioli feat. Rabea & Hannah
Leo Moracchioli (born 10 October 1978 in Ålgård) is a Norwegian musician. He is known for his metal covers of popular songs, which have gained him over 4.5 million followers on YouTube as Frog Leap Studios. The Frog Leap band members are Leo Moracchioli (vocals and guitar), Hannah Boulton (female vocals), Erik Torp (bass), Rabea Massaad (guitar), Truls Haugen (vocals and drums).
