.jh
A Darker Shade of Black

I broke my blog…

Posted by
.jh
on
sblg: path/to/file.xml:7:0: no element found *** Error 1 in
(Makefile:111 'path/to/file.html')

well that’s not the most helpful error. The way the blog is setup, I write files in markdown, they get converted to XML and then to HTML, so looking at the generated XML file it only had the headers in it which are generated from a template so clearly something in my post was breaking it. I took an old post and tried to generate the XML, same error; so something had changed when I upgraded last week, a quick look at the mail the upgrade generated confirmed that sblg stayed at the same version, which means that one of the dependencies changed, question was which one and what. It was fairly late and I was tired so I should have thought of this earlier but when I run the command to generate posts it produces a lot of output and this scrolls by fast. So scrolling up to the very beginning I found the issue:

lowdown: unknown option -- E

The lowdown(1) manpage confirms there is no E flag, but what did the E flag do? Now the intrepid reader will remember my post where I mentioned I had found all the required scaffolding for this on another site, well I had only ever modified the pieces which didn’t work for me, not actually figured out all the intricacies, in my Makefile I had:

lowdown -E html-escape $< ;

the manpage had a few flag dealing with HTML, but none that matched that exactly. I headed to the version history and found that the current version removed the deprecated E option which a long time ago had been replaced by long options. Scrolling further down I found that in version 0.5.2 long options where introduced. So I downloaded the version before that, 0.5.0, so I could extract the included manpage and find out what the old E option with html-escape did before it was deprecated.

     -E feature
             Enable the given feature (see Output features).  See -D.
             You can specify this multiple times for different
             features.

and

     html-escape
             Leaves in-line HTML in its source form as if it were
             opaque text.

Making progress, now back to the current manpage to look at what this could mean. There were two long options which talked about html escapes:

     --html-no-escapehtml
             If --html-no-skiphtml has been specified, this causes
             embedded HTML not to be escaped, and is instead output
             verbatim.  This has no effect if --html-no-skiphtml has
             not been specified.

and

     --html-no-skiphtml
             Output embedded HTML.  By default, embedded HTML is not
             output at all.  See --html-no-escapehtml.

Now the wording differs but it seemed clear that the second option was the one I wanted. So I modified my Makefile and I could again generate blog posts. Success!

But reading the first option got me thinking, once again referring back to my initial sblg post, one of my issues was that when I make posts with embedded links when I put them in the markdown file, lowdown will mangle it, so I’d have to manually edit the XML file afterwards and then recreate the HTML file. This was always annoying but relatively quick to fix, but I started wondering if the first option might actually fix this. Turns out that it does, so modifying my Makefile to use that flag too I have saved myself that extra manual step. Just goes to show that reading the manual can actually reap some rewards.

Permalink, Source, Tags: aboutblogtechopenbsdsblg2021

Latest

All posts →

Tags

blog music best of 2013 playlist running 2011 2009 2021 2010 best of 2009 2018 2019 2017 best of 2018 best of 2017 best of 2013 best of 2011 best of 2010 2022 best of 2023 best of 2022 best of 2021 best of 2020 best of 2019 best of 2016 best of 2015 best of 2014 best of 2012 2023 2020 2016 2015 2014 2012 Blut Aus Nord riding ThrowbackThursday Nightbringer Deathspell Omega about Spektr Shining Peste Noire Mgła Mephorash Funeral Mist Anaal Nathrakh Aara traffic thoughts openbsd driving cars Ungfell Selbst Sargeist Porta Nigra Nazxul Misery Index Jordfäst Gaerea Funereal Presence Drudkh Cénotaphe Blaze of Perdition Behexen Ashencult Ash Pool Aorlhac Akhlys Afsky מזמור and Thou מזמור worst idea ever trip report travel tech sblg rdist politics people i can do without nostalgia mdf marriage holiday decorations hate family guy end dmv darker Woods of Desolation Watain Véhémence Vanum Vallendusk Ulcerate Uada Tyranny Thantifaxath Taubrą Sühnopfer Sphere Slow Sisyphean Shroud of Despondency Satanic Warmaster Sangus Pensées Nocturnes One Master Ondskapt Olde Throne None Nachtmystium Myrkskog Murg Mournful Congregation Mondocane Misþyrming Misotheist Merrimack L’Homme Absurde Lycus Lord Impaler Lifelover Lamp of Murmuur LVTHN Krieg Katharsis Kampfar Inquisition Immortal Hæthen Grafvitnir Gorgoroth Glorior Belli George Carlin Forlet Sires Ferriterium Emptiness Dødsengel Délétère Dumal Det Eviga Leendet Deströyer666 Deivos Dauþuz Darkspace Crafteon Canopy Cadaver Inc. Bâ'a Burzum Blood Abscission Blodhemn Bestia Arcana Belphegor Bell Witch Barghest Auðn Ateiggär Ash Borer Aset Arckanum Aosoth Aoratos Antzaat Antaeus Amon Amarth Aldebaran Acrimonious Abbotoir