Line Numbers in Hugo Codeblocks

I want my code blocks on the blog to sometimes have line numbers. Looking at the Hugo docs here and here led me to the linenos argument. While we’d start our code blocks like (```python)1, all I need more is to add the line number argument like so. Vanilla code block … print(f""" “It’s silly to try to escape other people’s faults. They are inescapable. Just try to escape your own.” — Marcus Aurelius """) print(f""" “Just that you do the right thing. The rest doesn’t matter.” – Marcus Aurelius """) Now, using the linenos option, I can be all fancy to show … ...

September 17, 2022 · Mario Jason Braganza

Thank God for Noah

This James Somers post, made me realise why my dictionary word lookups were so much less engaging than when I was a kid. From the post … […] go look up “flash” in Webster’s (the edition I’m using is the 1913). The first thing you’ll notice is that the example sentences don’t sound like they came out of a DMV training manual (“the lights started flashing”) — they come from Milton and Shakespeare and Tennyson (“A thought flashed through me, which I clothed in act”) ...

September 16, 2022 · Mario Jason Braganza

Rename a File as You Work on It in Emacs

I often fat fingered the file name / buffer name / Org Roam link name when launching something new. And then when I am busy and knee deep in work, I glance up to see the error glaring at me. I figured out, looked up how to fix it Hit C-x d to flip into a dired buffer Find my filename in the list. (C-s can help search and narrow stuff) Then C-x C-q to go into Wdired mode Change the file name to whatever I want it to C-c C-c to be done with it. Et voilà! (If you are editing an Org Roam node, M-x org-roam-db-sync to keep everything shipshape)1 ...

September 16, 2022 · Mario Jason Braganza

Drafts App Needs Escaping if I Am to Use Hugo Shortcodes

When I finally figured out how to get line breaks working on my microblog, I ran into another sort of hiccough, when I tried doing that from my phone. I use the Drafts app on my phone and tablet to slice and dice all manner of text and to send it to various locations as I please. One of those is a workflow, that lets me shoot text to a folder on my server which is then published (via a script) on the microblog. And everytime I typed my {{< hbr >}} Hugo shortcode to let me have a line break in that post1, it would just publish gibberish2 instead of giving me said break. ...

September 14, 2022 · Mario Jason Braganza

Line Breaks on My Microblog

I use a (not quite) hidden blog to collect all sorts of bits and bobs and to (selectively and automatically) publish them to my fediverse or twitter accounts. The one thing that constantly bugged me, was that it would not accept line breaks to differentiate between paragraphs. Like this post, here. I don’t know if it’s my theme or a Hugo thing. And try as I might, I couldn’t quite figure it out. Since I don’t quite have the time to dig into the code, I just decided to add a couple of <br> tags. And that did the trick! 1 ...

August 31, 2022 · Mario Jason Braganza

Moving Tasks Between Org Files in Emacs

More diving into Org Mode and Emacs. I have a stuff-to-do.org file, that serves as an inbox for most long term tasks that I want to tackle. Stuff that needs doing, books that I want to buy, books that I want to read, courses that I want to learn, movies or tv shows that I want to watch, stuff on the web that I want to catchup on, etc. etc. etc. ...

August 23, 2022 · Mario Jason Braganza