<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hugo on Janusworx</title><link>https://janusworx.com/tags/hugo/</link><description>Recent content in Hugo on Janusworx</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>feedback@janusworx.com (Mario Jason Braganza)</managingEditor><webMaster>feedback@janusworx.com (Mario Jason Braganza)</webMaster><copyright>© 2026, Mario Jason Braganza</copyright><lastBuildDate>Fri, 24 Jul 2026 08:30:00 +0530</lastBuildDate><atom:link href="https://janusworx.com/tags/hugo/index.xml" rel="self" type="application/rss+xml"/><item><title>Moved From Papermod to Blowfish</title><link>https://janusworx.com/work/moved-from-papermod-to-blowfish/</link><pubDate>Fri, 24 Jul 2026 08:30:00 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/moved-from-papermod-to-blowfish/</guid><description>&lt;br&gt;

&lt;div class="admonition relative overflow-hidden rounded-lg border-l-4 my-3 px-4 py-3 shadow-sm" data-type="info"&gt;
 &lt;div class="flex items-center gap-2 font-semibold text-inherit"&gt;
 &lt;div class="flex shrink-0 h-5 w-5 items-center justify-center text-lg"&gt;&lt;span class="relative block icon"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"&gt;&lt;path fill="currentColor" d="M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 128c17.67 0 32 14.33 32 32c0 17.67-14.33 32-32 32S224 177.7 224 160C224 142.3 238.3 128 256 128zM296 384h-80C202.8 384 192 373.3 192 360s10.75-24 24-24h16v-64H224c-13.25 0-24-10.75-24-24S210.8 224 224 224h32c13.25 0 24 10.75 24 24v88h16c13.25 0 24 10.75 24 24S309.3 384 296 384z"/&gt;&lt;/svg&gt;
&lt;/span&gt;&lt;/div&gt;
 &lt;div class="grow"&gt;
 Intended Audience
 &lt;/div&gt;
 &lt;/div&gt;&lt;div class="admonition-content mt-3 text-base leading-relaxed text-inherit"&gt;&lt;p&gt;Me.&lt;br&gt;
This is a sorta-kinda living document, a record of my idiosyncratic decisions to first move to, and then bend the Blowfish theme to my needs.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;em&gt;&lt;strong&gt;Update (2026-07-24) :&lt;/strong&gt;&lt;/em&gt; &lt;a href="https://janusworx.com/work/moved-from-papermod-to-blowfish/#rss" &gt;RSS updates&lt;/a&gt;, &lt;a href="https://janusworx.com/work/moved-from-papermod-to-blowfish/#miscellanea" &gt;Miscellanea&lt;/a&gt;, some editing.&lt;/p&gt;

&lt;figure class="mjb-img-center"&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2026/moved-from-papermod-to-blowfish_logo.png" alt="Blowfish Hugo theme logo, a pufferfish in blue and white" /&gt;
 
 &lt;figcaption&gt;Blowfish theme logo&lt;/figcaption&gt;
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;I changed my blog theme from &lt;a href="https://adityatelange.github.io/hugo-PaperMod/" target="_blank" rel="noreferrer"&gt;Papermod&lt;/a&gt; to &lt;a href="https://blowfish.page" target="_blank" rel="noreferrer"&gt;Blowfish&lt;/a&gt;.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Why move to &lt;a href="https://blowfish.page" target="_blank" rel="noreferrer"&gt;Blowfish&lt;/a&gt;?
 &lt;div id="why-move-to-blowfish" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#why-move-to-blowfish" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://adityatelange.github.io/hugo-PaperMod/" target="_blank" rel="noreferrer"&gt;Papermod&lt;/a&gt;, to my mind, is perfection. And I outgrew it. That’s all there is to the why.&lt;br&gt;
Papermod caters to the needs of a blog, and I think my blog is slowly turning into a multi section website.&lt;br&gt;
I want menus, and possibly submenus and Papermod does not do them.&lt;br&gt;
The finished outcome, while not as pretty and uniform as the old Papermod site, makes writing and managing it all, much simpler.&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;h2 class="relative group"&gt;Blowfish specific things for future Jason to note.
 &lt;div id="blowfish-specific-things-for-future-jason-to-note" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#blowfish-specific-things-for-future-jason-to-note" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;

&lt;h3 class="relative group"&gt;Big Picture things
 &lt;div id="big-picture-things" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#big-picture-things" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;The theme does a lot. Most of which I don’t think I need.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;li&gt;The aim is to match what my site looked with Papermod, as closely as possible.&lt;/li&gt;
&lt;li&gt;Everything CSS is in &lt;code&gt;assets/css/custom.css&lt;/code&gt;, rather than multiple CSS files as it was with Papermod.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://janusworx.com/work/you-can-now-search-this-blog/" &gt;Pagefind&lt;/a&gt; powers search on the site. The inbuilt search is disabled in &lt;code&gt;main.toml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Footnotes use &lt;a href="https://janusworx.com/work/note-to-self-footnotes-using-littlefoot.js/" &gt;Littlefoot&lt;/a&gt;; so they appear as popups, and the need to scroll up and down the page is reduced.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;Configuration
 &lt;div id="configuration" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#configuration" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Blowfish separates everything out in its config. Lots of &lt;code&gt;toml&lt;/code&gt; files in there.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Base config is in &lt;code&gt;hugo.toml&lt;/code&gt;, theme parameters are in &lt;code&gt;params.toml&lt;/code&gt;, menus in &lt;code&gt;menus.XX.toml&lt;/code&gt; and language + translation related stuff is in &lt;code&gt;languages.XX.toml&lt;/code&gt; &lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;main.toml&lt;/code&gt; sets the theme, the &lt;code&gt;baseURL&lt;/code&gt; and I’ve added a section to limit RSS entries to only the last 50 items.&lt;/li&gt;
&lt;li&gt;The author parameters along with the social link set, as well as the logo, are in &lt;code&gt;languages.XX.toml&lt;/code&gt;. I have duplicated them. One for &lt;code&gt;EN&lt;/code&gt; and one for &lt;code&gt;FR&lt;/code&gt;. The logo that it requires, is in the &lt;code&gt;assets/logo&lt;/code&gt; directory.&lt;/li&gt;
&lt;li&gt;Menus and submenus in &lt;code&gt;menus.XX.toml&lt;/code&gt;. Duplicated. The English menus have English names and the French, French ones.&lt;/li&gt;
&lt;li&gt;Parameters; the header is set to basic. Every other option creates a sticky header of some sort. Lots of other changes. Most are self explanatory. Turned off “Hero” options everywhere, to stick to a plain, basic layout as much as possible.&lt;/li&gt;
&lt;li&gt;My split of the various configuration files for environments (base, development &amp;amp; production) have stayed the same with no changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;Content Structure
 &lt;div id="content-structure" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#content-structure" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Directories and subdirectories for each section.&lt;/li&gt;
&lt;li&gt;Make sure each section has a corresponding &lt;code&gt;index.XX.md&lt;/code&gt; for static pages or &lt;code&gt;_index.XX.md&lt;/code&gt; for list pages. This, I think (but am not sure) has fixed my old, nagging issue of page navigation overflowing. I would keep going next, in the Talks section for example, and when I reached the end, it would show me another entry from some other section. Now the front/back buttons stay restricted to the section they are in.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;Archetypes
 &lt;div id="archetypes" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#archetypes" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;All the archetypes have been slightly tweaked. They now also include a template line for an image. It uses the theme’s &lt;code&gt;figure&lt;/code&gt; shortcode for images.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;i18n (Internationalisation)
 &lt;div id="i18n-internationalisation" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#i18n-internationalisation" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;The internationalisation options are easier here. Just defining a term somewhere and then referring to it here just works.&lt;br&gt;
For e.g., I use &lt;code&gt;search_placeholder&lt;/code&gt; as a term in the &lt;code&gt;search&lt;/code&gt; layout and then in &lt;code&gt;i18n/en.yaml&lt;/code&gt; I have, &lt;code&gt;search_placeholder: &amp;quot;Search for something …&amp;quot;&lt;/code&gt; while &lt;code&gt;i18n/fr.yaml&lt;/code&gt; gives the same term a different spin, &lt;code&gt;search_placeholder: &amp;quot;Rechercher des articles …&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;Layout Overrides
 &lt;div id="layout-overrides" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#layout-overrides" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;

&lt;h4 class="relative group"&gt;RSS
 &lt;div id="rss" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#rss" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Have tweaked the RSS layout a teensy bit. My version is in &lt;code&gt;layouts/_default/rss.xml&lt;/code&gt;, which includes the full text of the post, instead of just a summary.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;&amp;lt;!-- &amp;lt;description&amp;gt;&lt;/span&gt;&lt;span class="cm"&gt;{{/* .Summary | transform.XMLEscape | safeHTML */}}&lt;/span&gt;&lt;span class="c"&gt;&amp;lt;/description&amp;gt; --&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;description&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="na"&gt;.Content&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;transform&lt;/span&gt;&lt;span class="na"&gt;.XMLEscape&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;safeHTML&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;description&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Have restricted RSS feed generation for posts in the &lt;a href="https://janusworx.com/nm/" &gt;Notes and Miscellanea&lt;/a&gt; section. They won’t appear in the RSS feed unless I want them to. Most of them are just streams of consciousness, to help me get on with my day. Only a few are exceptions, that I want published.&lt;br&gt;
I even disable sitemap generation for those “important to me, but useless for thee” posts with this bit of metadata in each post&lt;sup id="fnref:3"&gt;&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref"&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;sitemap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;disable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;So I have then taken advantage of this fact, to exclude these posts from having entries in the RSS feed, by telling Hugo to only look at posts where such a key does not exist; which basically, is everything else.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;&amp;lt;!-- &lt;/span&gt;&lt;span class="cm"&gt;{{/* range $pages */}}&lt;/span&gt;&lt;span class="c"&gt; --&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;range&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;where&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;$pages&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;Sitemap.Disable&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;ne&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 class="relative group"&gt;Search
 &lt;div id="search" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#search" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;This pulls in the script and the styles for &lt;a href="https://janusworx.com/work/you-can-now-search-this-blog/" &gt;Pagefind&lt;/a&gt;, which I use for searching the blog. Layout is in &lt;code&gt;layouts/_default/search.html&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Also note, then when working on search locally, first create an index with pagefind and move it to the static folder because our normal way of working is to render it all in memory.
&lt;ul&gt;
&lt;li&gt;do a &lt;code&gt;hugo build&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;then do &lt;code&gt;pagefind_extended --site public&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;then &lt;code&gt;mv public/pagefind static/pagefind&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;then &lt;code&gt;rm -rf public&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;and then start the hugo server like we normally do&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 class="relative group"&gt;Littlefoot
 &lt;div id="littlefoot" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#littlefoot" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Footnotes are powered by &lt;a href="https://janusworx.com/work/note-to-self-footnotes-using-littlefoot.js/" &gt;Littlefoot&lt;/a&gt;. Have used &lt;code&gt;layouts/partials/extend-footer.html&lt;/code&gt; to pull in the Littlefoot script and &lt;code&gt;layouts/partials/extend-footer.html&lt;/code&gt; to grab the CSS.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 class="relative group"&gt;Redirect
 &lt;div id="redirect" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#redirect" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;An old redirect template to redirect from one section to the other is still in place in the &lt;code&gt;layouts/redirect&lt;/code&gt; directory&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 class="relative group"&gt;Shortcodes
 &lt;div id="shortcodes" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#shortcodes" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Most of the old shortcodes made it over. Retired my image and caption shortcodes in favour of using Blowfish’s version. Also created an &lt;code&gt;hsgallery&lt;/code&gt; shortcode, so that I could continue using my old &lt;a href="https://github.com/mfg92/hugo-shortcode-gallery" target="_blank" rel="noreferrer"&gt;Hugo Shortcode Gallery&lt;/a&gt; to create image galleries. The &lt;code&gt;gallery&lt;/code&gt; shortcode conflicts with Blowfish’s own, which I don’t like and so won’t use.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;Static + Tools
 &lt;div id="static--tools" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#static--tools" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Fonts and Littlefoot reside in the &lt;code&gt;static&lt;/code&gt; directory, along with all my images.&lt;/li&gt;
&lt;li&gt;There’s also a &lt;code&gt;tools&lt;/code&gt; directory which contains the Pagefind binary. This does not get published obviously. But the Forgejo action uses this to generate an index for the site and then sends the whole thing off to the VM.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;Themes
 &lt;div id="themes" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#themes" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Contains &lt;a href="https://blowfish.page" target="_blank" rel="noreferrer"&gt;Blowfish&lt;/a&gt; and &lt;a href="https://github.com/mfg92/hugo-shortcode-gallery" target="_blank" rel="noreferrer"&gt;Hugo Shortcode Gallery&lt;/a&gt;, added as &lt;code&gt;git&lt;/code&gt; submodules. I dropped Hugo Admonitions, because Blowfish has them already.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;CSS
 &lt;div id="css" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#css" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;All in &lt;code&gt;assets/css/custom.css&lt;/code&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Import fonts: Valkyrie for the site and Source Code Pro for code.&lt;/li&gt;
&lt;li&gt;Tweaked the Janusworx up left on my site, and changed all the nav bar items to use Valkyrie Caps.&lt;/li&gt;
&lt;li&gt;Dark mode links were not contrasty enough. So changed the colour and added an underline on hover.&lt;/li&gt;
&lt;li&gt;Added a class to the figure tag, so I could center the pics I use.&lt;/li&gt;
&lt;li&gt;Added an indent to the numbered list items on the Annual Book List pages, so that the numbers stay &lt;em&gt;under&lt;/em&gt; each month.&lt;/li&gt;
&lt;li&gt;Style littlefoot footnotes, so that the button is slightly smaller and higher, and the notes use Valkyrie, along with a couple of other tiny tweaks.&lt;/li&gt;
&lt;li&gt;Style the Blowfish box, and the results, on the search page&lt;/li&gt;
&lt;li&gt;Main thing to note. Use &lt;code&gt;!important;&lt;/code&gt; liberally. Changes don’t always cascade down correctly.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 class="relative group"&gt;Miscellanea
 &lt;div id="miscellanea" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#miscellanea" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;

&lt;h4 class="relative group"&gt;Go Templates:
 &lt;div id="go-templates" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#go-templates" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;```go-html-template&lt;/code&gt; as the language hint to the code fence to display Go template code correctly. (like I needed to in this post for e.g.)&lt;/li&gt;
&lt;li&gt;If it is pure Go Template stuff with little to no html, another alternative is &lt;code&gt;```go-text-template &lt;/code&gt;&lt;/li&gt;
&lt;li&gt;I could not just comment out Go template code with HTML comment markers &lt;code&gt;&amp;lt;!-- --&amp;gt;&lt;/code&gt;. The Hugo live server kept crashing on me with weird EOF errors, until I figured this out. The Go template block needs a comment marker &lt;em&gt;inside&lt;/em&gt; the the &lt;code&gt;{{ … }}&lt;/code&gt; section like so, &lt;code&gt;{{/* … */}}&lt;/code&gt;.&lt;br&gt;
E.g. &lt;code&gt;{{/* range $pages */}}&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post?&lt;br&gt;
Mail me at &lt;a href="mailto:feebdback@janusworx.com?subject=%22Feedback on post: Moved From Papermod to Blowfish
%22" &gt;feedback at this domain&lt;/a&gt;.&lt;br&gt;
P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;famous last words!&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;XX is the language code. I have EN for English and FR for French. So &lt;code&gt;menus.fr.toml&lt;/code&gt; for e.g.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:3"&gt;
&lt;p&gt;I have modified the notes archetype, so this is always pre filled and set.&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>You Can Now Search this Blog</title><link>https://janusworx.com/work/you-can-now-search-this-blog/</link><pubDate>Tue, 23 Jun 2026 14:24:24 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/you-can-now-search-this-blog/</guid><description>&lt;br&gt;

&lt;div class="admonition relative overflow-hidden rounded-lg border-l-4 my-3 px-4 py-3 shadow-sm" data-type="info"&gt;
 &lt;div class="flex items-center gap-2 font-semibold text-inherit"&gt;
 &lt;div class="flex shrink-0 h-5 w-5 items-center justify-center text-lg"&gt;&lt;span class="relative block icon"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"&gt;&lt;path fill="currentColor" d="M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 128c17.67 0 32 14.33 32 32c0 17.67-14.33 32-32 32S224 177.7 224 160C224 142.3 238.3 128 256 128zM296 384h-80C202.8 384 192 373.3 192 360s10.75-24 24-24h16v-64H224c-13.25 0-24-10.75-24-24S210.8 224 224 224h32c13.25 0 24 10.75 24 24v88h16c13.25 0 24 10.75 24 24S309.3 384 296 384z"/&gt;&lt;/svg&gt;
&lt;/span&gt;&lt;/div&gt;
 &lt;div class="grow"&gt;
 Intended Audience
 &lt;/div&gt;
 &lt;/div&gt;&lt;div class="admonition-content mt-3 text-base leading-relaxed text-inherit"&gt;&lt;p&gt;Me. In case I want to retrace the big idea tomorrow&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2026/you-can-now-search-this-blog-pagefind.png" alt="Pagefind PNG logo" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;h3 class="relative group"&gt;tldr: &lt;a href="https://janusworx.com/search" target="_blank" rel="noreferrer"&gt;https://janusworx.com/search&lt;/a&gt;
 &lt;div id="tldr" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#tldr" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Being the lazyass that I am, I used to depend on search engine indexes to find something on my own blog. (First google, then DuckDuckGo.)&lt;br&gt;
Kushal, having &lt;a href="https://search.kushaldas.in/" target="_blank" rel="noreferrer"&gt;https://search.kushaldas.in/&lt;/a&gt; has always made me jealous though.&lt;br&gt;
And now, the days of finding something relevant on my blog, on the first search are long gone. Search engines today are a pale shadow of what they used to be. The current load of crap actually makes me long for the days of &lt;a href="https://en.wikipedia.org/wiki/AltaVista" target="_blank" rel="noreferrer"&gt;Altavista&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;So, I decided to get off my butt, and go do something about it, because everytime I want something, my blog is one of the first places I search.&lt;br&gt;
For e.g. when writing this post, I needed to look up how to add line numbers to my code blocks. &lt;a href="https://janusworx.com/work/line-numbers-in-hugo-codeblocks/" &gt;Search helped me find it&lt;/a&gt; :)&lt;/p&gt;
&lt;p&gt;I went to the &lt;a href="https://gohugo.io/tools/search/" target="_blank" rel="noreferrer"&gt;Hugo website&lt;/a&gt; and decided to implement the first search tool&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; they suggested: &lt;em&gt;&lt;strong&gt;&lt;a href="https://pagefind.app" target="_blank" rel="noreferrer"&gt;Pagefind&lt;/a&gt;&lt;/strong&gt;&lt;/em&gt;.&lt;br&gt;
Well, I did that since Pagefind took care of the only thing I’m anal about. It keeps everything local and under my control. If not, I’d have kept looking for something else.&lt;br&gt;
What it (Pagefind) does, is parse the site, Hugo builds for me, and create a search index along with some more goodies (an api for search as well as UI components) in a bundle. The rendered html and the bundle together are now the artifact that my site is made up of.&lt;/p&gt;

&lt;h2 class="relative group"&gt;The Plan
 &lt;div id="the-plan" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-plan" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Get Pagefind and install it into a tools subdirectory in my blog’s directory, so I always have it handy (and the Forgejo action can get its grubby paws on it when it wants to run the publishing workflow)&lt;/li&gt;
&lt;li&gt;Create an entry in my menu, so I can go clicky to a search page.&lt;/li&gt;
&lt;li&gt;Create said search page.&lt;/li&gt;
&lt;li&gt;Make search work.&lt;/li&gt;
&lt;li&gt;Make the page resemble the rest of the blog as much as possible.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 class="relative group"&gt;Installing it and wiring it all up
 &lt;div id="installing-it-and-wiring-it-all-up" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#installing-it-and-wiring-it-all-up" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;

&lt;h3 class="relative group"&gt;1. Installation
 &lt;div id="1-installation" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#1-installation" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;This is the easy part. Pagefind is a single binary, which I shoved into the &lt;code&gt;tools&lt;/code&gt; subdirectory.&lt;/p&gt;

&lt;h3 class="relative group"&gt;2. Creating an entry for search in the navigation menu
 &lt;div id="2-creating-an-entry-for-search-in-the-navigation-menu" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#2-creating-an-entry-for-search-in-the-navigation-menu" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;I edited my Hugo config (mine is called &lt;code&gt;hugo.yaml&lt;/code&gt;), and added &lt;code&gt;search&lt;/code&gt; as a menu item.&lt;br&gt;
More shifted downwards, as did its weight.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;menus&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;main&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# elided config&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;identifier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;search&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;search&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;/search&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;60&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;identifier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;more&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;more …&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;/more/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;70&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;3. Creating the search page.
 &lt;div id="3-creating-the-search-page" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#3-creating-the-search-page" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;This was a two step process.&lt;/p&gt;

&lt;h4 class="relative group"&gt;a. I needed a placeholder page that I could render some layout (a template) into.
 &lt;div id="a-i-needed-a-placeholder-page-that-i-could-render-some-layout-a-template-into" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#a-i-needed-a-placeholder-page-that-i-could-render-some-layout-a-template-into" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;p&gt;This was &lt;code&gt;search.md&lt;/code&gt; which lives in my &lt;code&gt;content&lt;/code&gt; directory.
This is all it contains …&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nn"&gt;---&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Search&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;layout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;search&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;/search/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nn"&gt;---&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;See the key that says &lt;code&gt;layout&lt;/code&gt; on line 3? This is looking for a layout called &lt;code&gt;search&lt;/code&gt; which is what we now create …&lt;/p&gt;

&lt;h4 class="relative group"&gt;b. Creating the search layout.
 &lt;div id="b-creating-the-search-layout" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#b-creating-the-search-layout" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;p&gt;Papermod already ships with a layout called &lt;code&gt;search&lt;/code&gt;. Which I did not want, because it is meant for use with another local search engine called &lt;a href="https://lunrjs.com/" target="_blank" rel="noreferrer"&gt;lunr.js&lt;/a&gt;.&lt;br&gt;
Hugo can override whatever file your theme provides, by letting you create your own versions of said file in the &lt;code&gt;layouts&lt;/code&gt; directory. Hugo will then look at &lt;em&gt;that&lt;/em&gt; instead of the theme’s file.&lt;br&gt;
Over the years I’ve gotten dangerous enough by using &lt;a href="https://discourse.gohugo.io/t/how-to-override-a-themes-partials/47227" target="_blank" rel="noreferrer"&gt;Hugo’s lovely channel for discourse&lt;/a&gt;. Between that, and &lt;a href="https://gohugo.io/documentation/" target="_blank" rel="noreferrer"&gt;Hugo’s documentation&lt;/a&gt; as well as &lt;a href="https://pagefind.app/" target="_blank" rel="noreferrer"&gt;Pagefind’s own help page&lt;/a&gt;, I rustled up a layout file called &lt;code&gt;search.html&lt;/code&gt; which lives in my &lt;code&gt;layouts/_default&lt;/code&gt; directory. This is what it contains …&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;define&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;main&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;link&lt;/span&gt; &lt;span class="na"&gt;rel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;stylesheet&amp;#34;&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;/pagefind/pagefind-component-ui.css&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;module&amp;#34;&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;/pagefind/pagefind-component-ui.js&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;main&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;post-single&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;header&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;post-header&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;post-title&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="na"&gt;.Title&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;header&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;post-content search-content&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;pagefind-searchbox&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;searchbox&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			 &lt;span class="na"&gt;autofocus&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;true&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			 &lt;span class="na"&gt;shortcut&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;/&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;			 &lt;span class="na"&gt;placeholder&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;&lt;/span&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;i18n&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;search_placeholder&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;pagefind-searchbox&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;article&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;// we’re waiting for the pagefind-searchbox component to be registered 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;customElements&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;whenDefined&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;pagefind-searchbox&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kr"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;box&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;pagefind-searchbox&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;// shadowRoot input, or a delegatesFocus component may expose it differently
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kr"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tryFocus&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kr"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;box&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shadowRoot&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;input&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;box&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;input&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="c1"&gt;// search for input boxes in two different ways above
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="c1"&gt;// and if it finds one focus it below
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;focus&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;// component rendered but input not yet in DOM — wait one more frame
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	 &lt;span class="c1"&gt;// wait for the shado
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;requestAnimationFrame&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;tryFocus&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;// try one more time
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;requestAnimationFrame&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;tryFocus&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;end&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This creates the box on the search page, ready to take input and show results.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Update (2026-06-24):&lt;/strong&gt;&lt;/em&gt; The eagle eyed amongst you, have figured out this code has changed between yesterday and today. I used Pagefind’s documentation to simplify what I had yesterday even more and then got one of the llms to write a script that focuses the input box when the page loads, so that we can just start typing in whatever we need to search.&lt;/p&gt;

&lt;h3 class="relative group"&gt;4. Make the page resemble the rest of the blog as much as possible.
 &lt;div id="4-make-the-page-resemble-the-rest-of-the-blog-as-much-as-possible" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#4-make-the-page-resemble-the-rest-of-the-blog-as-much-as-possible" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Doing things a bit out of order and finishing up with the page first.&lt;br&gt;
Leaned on Pagefind’s docs as well as Chatgpt, Claude and Gemini for this part to create a CSS file, that looks pretty native to my blog. I’ve called it &lt;code&gt;include-pagefind.css&lt;/code&gt; and it lives in the &lt;code&gt;assets/css/extended&lt;/code&gt; subdirectory.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;span class="lnt"&gt;20
&lt;/span&gt;&lt;span class="lnt"&gt;21
&lt;/span&gt;&lt;span class="lnt"&gt;22
&lt;/span&gt;&lt;span class="lnt"&gt;23
&lt;/span&gt;&lt;span class="lnt"&gt;24
&lt;/span&gt;&lt;span class="lnt"&gt;25
&lt;/span&gt;&lt;span class="lnt"&gt;26
&lt;/span&gt;&lt;span class="lnt"&gt;27
&lt;/span&gt;&lt;span class="lnt"&gt;28
&lt;/span&gt;&lt;span class="lnt"&gt;29
&lt;/span&gt;&lt;span class="lnt"&gt;30
&lt;/span&gt;&lt;span class="lnt"&gt;31
&lt;/span&gt;&lt;span class="lnt"&gt;32
&lt;/span&gt;&lt;span class="lnt"&gt;33
&lt;/span&gt;&lt;span class="lnt"&gt;34
&lt;/span&gt;&lt;span class="lnt"&gt;35
&lt;/span&gt;&lt;span class="lnt"&gt;36
&lt;/span&gt;&lt;span class="lnt"&gt;37
&lt;/span&gt;&lt;span class="lnt"&gt;38
&lt;/span&gt;&lt;span class="lnt"&gt;39
&lt;/span&gt;&lt;span class="lnt"&gt;40
&lt;/span&gt;&lt;span class="lnt"&gt;41
&lt;/span&gt;&lt;span class="lnt"&gt;42
&lt;/span&gt;&lt;span class="lnt"&gt;43
&lt;/span&gt;&lt;span class="lnt"&gt;44
&lt;/span&gt;&lt;span class="lnt"&gt;45
&lt;/span&gt;&lt;span class="lnt"&gt;46
&lt;/span&gt;&lt;span class="lnt"&gt;47
&lt;/span&gt;&lt;span class="lnt"&gt;48
&lt;/span&gt;&lt;span class="lnt"&gt;49
&lt;/span&gt;&lt;span class="lnt"&gt;50
&lt;/span&gt;&lt;span class="lnt"&gt;51
&lt;/span&gt;&lt;span class="lnt"&gt;52
&lt;/span&gt;&lt;span class="lnt"&gt;53
&lt;/span&gt;&lt;span class="lnt"&gt;54
&lt;/span&gt;&lt;span class="lnt"&gt;55
&lt;/span&gt;&lt;span class="lnt"&gt;56
&lt;/span&gt;&lt;span class="lnt"&gt;57
&lt;/span&gt;&lt;span class="lnt"&gt;58
&lt;/span&gt;&lt;span class="lnt"&gt;59
&lt;/span&gt;&lt;span class="lnt"&gt;60
&lt;/span&gt;&lt;span class="lnt"&gt;61
&lt;/span&gt;&lt;span class="lnt"&gt;62
&lt;/span&gt;&lt;span class="lnt"&gt;63
&lt;/span&gt;&lt;span class="lnt"&gt;64
&lt;/span&gt;&lt;span class="lnt"&gt;65
&lt;/span&gt;&lt;span class="lnt"&gt;66
&lt;/span&gt;&lt;span class="lnt"&gt;67
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-css" data-lang="css"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;root&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="c"&gt;/* you don’t really need to use `pf-font`, 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;	if you don’t have a custom font.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;	for some reason, it wouldn’t render the font I specified here, 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;	so I forced it with `!important` */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;--pf-font&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;your-font-name-here&lt;/span&gt; &lt;span class="cp"&gt;!important&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;--pf-text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;primary&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;--pf-text-secondary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;secondary&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;--pf-text-muted&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;secondary&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;--pf-background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;--pf-border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;border&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;--pf-border-focus&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;primary&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;--pf-hover&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;tertiary&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;--pf-mark&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;primary&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;--pf-border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;--pf-input-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;48&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;--pf-input-font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="kt"&gt;rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;--pf-result-title-font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="kt"&gt;rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;--pf-result-excerpt-font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.90&lt;/span&gt;&lt;span class="kt"&gt;rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;--pf-shadow-sm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;--pf-shadow-md&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;--pf-shadow-lg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;search-content&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="kt"&gt;rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;pagefind-input&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;margin-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1.5&lt;/span&gt;&lt;span class="kt"&gt;rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;pagefind-summary&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;margin-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="kt"&gt;rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;pagefind-results&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="kt"&gt;rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;pagefind-results&lt;/span&gt; &lt;span class="nt"&gt;a&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;text-decoration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;pagefind-results&lt;/span&gt; &lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt; &lt;span class="kc"&gt;solid&lt;/span&gt; &lt;span class="nf"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;border&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="kt"&gt;rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;pagefind-results&lt;/span&gt; &lt;span class="nt"&gt;article&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;hover&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;tertiary&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;h3 class="relative group"&gt;5. Make Search Work.
 &lt;div id="5-make-search-work" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#5-make-search-work" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;This is a 3 step process&lt;/p&gt;

&lt;h4 class="relative group"&gt;a. Build the blog.
 &lt;div id="a-build-the-blog" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#a-build-the-blog" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;p&gt;Easy peasy. &lt;code&gt;hugo build&lt;/code&gt; and we have our blog rendered in the &lt;code&gt;public&lt;/code&gt; subdirectory.&lt;/p&gt;

&lt;h4 class="relative group"&gt;b. Get Pagefind to create its index in the build directory.
 &lt;div id="b-get-pagefind-to-create-its-index-in-the-build-directory" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#b-get-pagefind-to-create-its-index-in-the-build-directory" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;p&gt;This is easy as well.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;./tools/pagefind --site public&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;and Pagefind creates a &lt;code&gt;pagefind&lt;/code&gt; subdirectory in our &lt;code&gt;public&lt;/code&gt; directory where it creates its search index after reading all the html.&lt;br&gt;
All I need to do now, is just …&lt;/p&gt;

&lt;h4 class="relative group"&gt;c. Publish!
 &lt;div id="c-publish" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#c-publish" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;p&gt;Ok, I lied a teensy bit. I don’t have to do &lt;em&gt;steps a.&lt;/em&gt; and &lt;em&gt;b.&lt;/em&gt; because they are part of &lt;em&gt;step c.&lt;/em&gt;&lt;br&gt;
The Forgejo action checks out my committed files, pulls in Hugo from a private package repo, builds the site, then runs Pagefind to generate the index&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt; and finally uses rysnc to sync it with the VM. Here’s the relevant section of the action.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;# lots of stuff elided …&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;build-and-deploy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;runs-on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;my-big-box&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;HUGO_VERSION&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;${{ vars.HUGO_VERSION }}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# lots of snipped stuff …&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Checkout the website repo&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;actions/checkout@v4&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;submodules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;recursive&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;fetch-depth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Build website with Hugo&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;HUGO_ENVIRONMENT&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;production&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; hugo \
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; --gc \
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; --minify&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Build the Pagefind search index&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; tools/pagefind \
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; --site public&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;br&gt;

&lt;p&gt;I thought the indexing would take a lot of time and was hesitant to use it as part of a regularly run Forgejo action workflow, but several runs show that the index generation only increases the time by at a couple of seconds at most. This is amazing!&lt;/p&gt;
&lt;p&gt;Now I can search my own words, on my own blog, to my hearts content!&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post?&lt;br&gt;
Mail me at &lt;a href="mailto:feebdback@janusworx.com?subject=%22Feedback on post: You Can Now Search this Blog
%22" &gt;feedback at this domain&lt;/a&gt;.
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;as on 2026-06-23&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;this is why i chucked it into the tools subdirectory and committed it.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Hugo Redirect From Post in One Section to Another</title><link>https://janusworx.com/work/hugo-redirect-from-post-in-one-section-to-another/</link><pubDate>Thu, 06 Nov 2025 08:34:36 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/hugo-redirect-from-post-in-one-section-to-another/</guid><description>
&lt;h2 class="relative group"&gt;Problem
 &lt;div id="problem" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#problem" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;I have a post in one section of my site, say &lt;a href="https://janusworx.com/nm/2025-11-06/" &gt;notes and miscellanea&lt;/a&gt;&lt;br&gt;
That is my canonical post.&lt;br&gt;
But I also need it to show up in the work section of my site, possibly with a another name.&lt;br&gt;
A Hugo &lt;code&gt;alias&lt;/code&gt; in the &lt;code&gt;yaml&lt;/code&gt; front matter does not work, since both sections exist and Hugo gets confused.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Solution
 &lt;div id="solution" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#solution" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Make sure &lt;code&gt;layouts/redirect/single.html&lt;/code&gt; exists within your Hugo folder structure and it contains just this line …&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-golang" data-lang="golang"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;{{&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;template&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;alias.html&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dict&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;Permalink&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="p"&gt;}}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="2"&gt;
&lt;li&gt;Create your &lt;a href="https://janusworx.com/nm/2025-11-06/" &gt;original post&lt;/a&gt; as usual&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Then&lt;/em&gt; go create a post in your &lt;em&gt;other&lt;/em&gt;&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; section with the following metadata:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nn"&gt;---&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;&amp;lt;Your title here&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;#date autogenerated by my archetype. if missing, add date&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;date&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ld"&gt;2025-11-06T08:30:54&lt;/span&gt;&lt;span class="m"&gt;+05&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="w"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;redirect&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;&amp;lt;url-to-redirect-to&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;summary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;&amp;lt;Optional text, that will appear in the sectiones listing page&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nn"&gt;---&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="4"&gt;
&lt;li&gt;The &lt;code&gt;date&lt;/code&gt; field is critical. The post might not appear where you expect it, if it’s absent.&lt;br&gt;
If not date, then you might need to use &lt;code&gt;weight&lt;/code&gt;. One of the two is needed.&lt;/li&gt;
&lt;li&gt;In my case, the metadata looked like this:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nn"&gt;---&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;The Plan for My New Hetzner VM&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;date&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ld"&gt;2025-11-06T08:30:54&lt;/span&gt;&lt;span class="m"&gt;+05&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;redirect&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;/nm/2025-11-06/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;summary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Alone and helpless, like you&amp;#39;ve lost your fight &lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nn"&gt;---&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ol start="6"&gt;
&lt;li&gt;Done! You can see an entry for “The Plan for My New Hetzner VM” in my work section as you see in the pic below. &lt;a href="https://janusworx.com/work/the-plan-for-my-new-hetzner-vm/" &gt;Clicking that&lt;/a&gt; will redirect to the actual post in my &lt;a href="https://janusworx.com/nm/2025-11-06/" &gt;Notes and Miscellanea&lt;/a&gt; section!&lt;/li&gt;
&lt;/ol&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2025/hugo-redirect-from-post-in-one-section-to-another.png" alt="Hugo Section with Post entries" /&gt;
 
 
 &lt;/figure&gt;
&lt;ol start="7"&gt;
&lt;li&gt;Tada 🎉&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post?&lt;br&gt;
Mail me at &lt;a href="mailto:feedback@janusworx.com?subject=%22Feedback on post: Hugo Redirect From Post in One Section to Another
%22" &gt;feedback at this domain&lt;/a&gt; or [continue the discourse here][2].
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;in my case, &lt;a href="https://janusworx.com/work/" &gt;work&lt;/a&gt;&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Forgejo Workflow Action to Publish Hugo Blog</title><link>https://janusworx.com/work/forgejo-workflow-action-to-publish-hugo-blog/</link><pubDate>Mon, 09 Jun 2025 15:09:16 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/forgejo-workflow-action-to-publish-hugo-blog/</guid><description>
&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/common/forgejo-logo.svg" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;I’d gotten this working earlier and wanted to post it up.&lt;br&gt;
And then promptly forgot about it.&lt;br&gt;
Until today that is, when I wanted to make changes to it.&lt;/p&gt;
&lt;p&gt;Here it is for posterity.&lt;br&gt;
The newest change is that the action now runs every six hours.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;span class="lnt"&gt;20
&lt;/span&gt;&lt;span class="lnt"&gt;21
&lt;/span&gt;&lt;span class="lnt"&gt;22
&lt;/span&gt;&lt;span class="lnt"&gt;23
&lt;/span&gt;&lt;span class="lnt"&gt;24
&lt;/span&gt;&lt;span class="lnt"&gt;25
&lt;/span&gt;&lt;span class="lnt"&gt;26
&lt;/span&gt;&lt;span class="lnt"&gt;27
&lt;/span&gt;&lt;span class="lnt"&gt;28
&lt;/span&gt;&lt;span class="lnt"&gt;29
&lt;/span&gt;&lt;span class="lnt"&gt;30
&lt;/span&gt;&lt;span class="lnt"&gt;31
&lt;/span&gt;&lt;span class="lnt"&gt;32
&lt;/span&gt;&lt;span class="lnt"&gt;33
&lt;/span&gt;&lt;span class="lnt"&gt;34
&lt;/span&gt;&lt;span class="lnt"&gt;35
&lt;/span&gt;&lt;span class="lnt"&gt;36
&lt;/span&gt;&lt;span class="lnt"&gt;37
&lt;/span&gt;&lt;span class="lnt"&gt;38
&lt;/span&gt;&lt;span class="lnt"&gt;39
&lt;/span&gt;&lt;span class="lnt"&gt;40
&lt;/span&gt;&lt;span class="lnt"&gt;41
&lt;/span&gt;&lt;span class="lnt"&gt;42
&lt;/span&gt;&lt;span class="lnt"&gt;43
&lt;/span&gt;&lt;span class="lnt"&gt;44
&lt;/span&gt;&lt;span class="lnt"&gt;45
&lt;/span&gt;&lt;span class="lnt"&gt;46
&lt;/span&gt;&lt;span class="lnt"&gt;47
&lt;/span&gt;&lt;span class="lnt"&gt;48
&lt;/span&gt;&lt;span class="lnt"&gt;49
&lt;/span&gt;&lt;span class="lnt"&gt;50
&lt;/span&gt;&lt;span class="lnt"&gt;51
&lt;/span&gt;&lt;span class="lnt"&gt;52
&lt;/span&gt;&lt;span class="lnt"&gt;53
&lt;/span&gt;&lt;span class="lnt"&gt;54
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Build and Deploy Janusworx website&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;schedule&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;cron&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;0 */6 * * *&amp;#39;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;workflow_dispatch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;push&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;branches&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;main&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;build-and-deploy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;runs-on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;intel&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# make sure there are runners tagged &amp;#34;intel&amp;#34; on your network or replace this with something of your own&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;HUGO_VERSION&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;${{ vars.HUGO_VERSION }}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Install wget &amp;amp; rsync&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;apt-get update &amp;amp;&amp;amp; apt-get install wget rsync -y&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Install Hugo&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; &amp;amp;&amp;amp; dpkg -i ${{ runner.temp }}/hugo.deb&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Checkout the website repo&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;actions/checkout@v4&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;submodules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;recursive&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;fetch-depth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Build website with Hugo&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;HUGO_ENVIRONMENT&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;production&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;TZ&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Asia/Kolkata&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; hugo \
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; --gc \
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; --minify
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; &lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Install SSH key&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; mkdir -p ~/.ssh
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; echo &amp;#34;${{ secrets.SSH_PRIVATE_KEY }}&amp;#34; &amp;gt; ~/.ssh/id_ed25519
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; chmod 600 ~/.ssh/id_ed25519
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; echo &amp;#34;${{ secrets.SSH_KNOWN_HOSTS }}&amp;#34; &amp;gt; ~/.ssh/known_hosts
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; chmod 644 ~/.ssh/known_hosts&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Deploy website with rsync&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;REMOTE_HOST&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;${{ vars.REMOTE_HOST }}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;REMOTE_USER&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;${{ vars.REMOTE_USER }}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;REMOTE_PATH&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;${{ vars.REMOTE_PATH }}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; rsync -avz --delete public/ $REMOTE_USER@$REMOTE_HOST:$REMOTE_PATH&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Notes:&lt;br&gt;
It needs a few variables set, in the repo (repo-&amp;gt;Settings-&amp;gt;Actions-&amp;gt;Variables), which are the details I need (Hugo version, Remote Host IP, Remote path to copy the built output to, and the Remote user to use for SSH) to push via rsync to the host.&lt;br&gt;
Hugo version is in there, because Hugo breaks things all the time, so I upgrade cautiously.&lt;/p&gt;
&lt;p&gt;It also needs a couple of secrets, set in the repo (repo-&amp;gt;Settings-&amp;gt;Actions-&amp;gt;Secrets) to enable rsync to copy. (SSH_KNOWN_HOSTS and SSH_PRIVATE_KEY). Also best if this is a dedicated private key just for copying.
Running &lt;code&gt;ssh-keyscan &amp;quot;your-host-name-or-ip&amp;quot; &amp;gt; known_host_data.txt&lt;/code&gt; should dump the data you’d need for SSH_KNOWN_HOSTS&lt;/p&gt;
&lt;p&gt;With the changes I made today, the workflow can publish&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;on demand&lt;/li&gt;
&lt;li&gt;every 6 hours&lt;/li&gt;
&lt;li&gt;every time I commit to the repo&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I added time based publishing, so that I could publish future dated posts as and when the time rolls around.&lt;br&gt;
With this, I think I’m done tinkering with my blog, with the exception of moving it out of my home network and out on to my VM, so that I can truly publish from anywhere. That is a big heft for me currently and a job for future Jason.&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post?&lt;br&gt;
Mail me at &lt;a href="mailto:feebdback@janusworx.com?subjectFeedback on post: Forgejo Workflow Action to Publish Hugo Blog
%22" &gt;feedback at this domain&lt;/a&gt; or [continue the discourse here][3].
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_l_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Hack Hugo Post Metadata With Python</title><link>https://janusworx.com/work/hack-hugo-post-metadata-with-python/</link><pubDate>Mon, 03 Feb 2025 09:33:37 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/hack-hugo-post-metadata-with-python/</guid><description>&lt;p&gt;&lt;a href="https://janusworx.com/work/some-site-housekeeping-new-sections-and-rss-feeds/" &gt;A while back&lt;/a&gt;, I rejigged the sections on my site to better reflect how I think and write.&lt;br&gt;
Which meant, all the urls, on all my posts changed, since they now used the new category as a slug, instead of ye old &lt;code&gt;/blog&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For e.g. &lt;a href="https://janusworx.com/blog/using-hugo-variables-to-help-with-mailto-links-in-hugo/" target="_blank" rel="noreferrer"&gt;https://janusworx.com/blog/using-hugo-variables-to-help-with-mailto-links-in-hugo/&lt;/a&gt; …&lt;br&gt;
was now at, &lt;a href="https://janusworx.com/work/using-hugo-variables-to-help-with-mailto-links-in-hugo/" target="_blank" rel="noreferrer"&gt;https://janusworx.com/work/using-hugo-variables-to-help-with-mailto-links-in-hugo/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After searching a bit, I found that Hugo supported &lt;a href="https://gohugo.io/content-management/urls/#aliases" target="_blank" rel="noreferrer"&gt;aliases&lt;/a&gt;. For me, it would redirect the original &lt;code&gt;/blog&lt;/code&gt; path url to its new location&lt;br&gt;
Ass I had to do, was add an &lt;code&gt;aliases: [&amp;quot;/blog/old-post-slug&amp;quot;]&lt;/code&gt; line to each post’s metadata.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;
Line 4 in the snippet below shows, what I added to fix the post above.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;span class="lnt"&gt;8
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nn"&gt;---&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Using Hugo Variables to Help With Mailto Links in Hugo&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;date&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ld"&gt;2024-05-30T18:17:35&lt;/span&gt;&lt;span class="m"&gt;+05&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;aliases&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;/blog/using-hugo-variables-to-help-with-mailto-links-in-hugo&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;categories&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;work&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;tags&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="l"&gt;100WordHabit, Dgplug, Hugo]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;summary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Shortcodes! Hugo Variables in Shortcodes!&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nn"&gt;---&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;I did &lt;em&gt;&lt;strong&gt;not&lt;/strong&gt;&lt;/em&gt; want to do this by hand for 800+ posts.&lt;br&gt;
One stroke of luck for me, was that I let Hugo use its default behaviour of generating url slugs from the file names. So even if the category slugs had changed (from &lt;code&gt;/blog&lt;/code&gt; to &lt;code&gt;/work&lt;/code&gt; or from &lt;code&gt;/blog&lt;/code&gt; to &lt;code&gt;/personal&lt;/code&gt;), the url slugs would stay the same. Which meant, I could whip up a script to run through all my markdown posts and add the alias line.&lt;br&gt;
So I did.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;pathlib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;INPUT_FOLDER&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;old-posts-folder&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;OUTPUT_FOLDER&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;modified-posts-folder&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;each_file&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;INPUT_FOLDER&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;iterdir&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;each_file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;r&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;file_to_read&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;alias_derived_from_file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;each_file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stem&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;contents_as_list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;file_to_read&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;readlines&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;contents_as_list&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;insert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;aliases: [&lt;/span&gt;&lt;span class="se"&gt;\&amp;#34;&lt;/span&gt;&lt;span class="s2"&gt;/blog/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;alias_derived_from_file&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\&amp;#34;&lt;/span&gt;&lt;span class="s2"&gt;]&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;OUTPUT_FOLDER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;each_file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;w+&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;file_to_write&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;file_to_write&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;writelines&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;contents_as_list&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;br&gt;

It takes all the posts from my old folder, inserts the alias line and puts them into a new folder.&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt; In essence, take each file, figure out the url slug from the file name, read in the contents as a list, insert my alias at position 3 (fourth actually. zero based indexing) of the list (below the title and date) and then write it all out to a new file.&lt;/p&gt;
&lt;p&gt;I ran it, published the site and then went to check on the old urls with bated breath.&lt;br&gt;
Hurrah, it all worked :)&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post?&lt;br&gt;
Mail me at &lt;a href="mailto:feebdback@janusworx.com?subject=%22Feedback on post: Hack Hugo Post Metadata With Python
%22" &gt;feedback at this domain&lt;/a&gt; or [continue the discourse here][3].
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;it’s a list, so I can add more aliases if I want to&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;no sense in botching up my originals :)&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Tmux Start Session Maximized With Three Panes</title><link>https://janusworx.com/work/tmux-start-session-maximized-with-three-panes/</link><pubDate>Sat, 01 Feb 2025 09:27:25 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/tmux-start-session-maximized-with-three-panes/</guid><description>&lt;p&gt;So I got tired of starting up a dedicated tmux session to manage all the work related to my writing sessions. Over the past few months, I’ve boiled it down to three.&lt;br&gt;
And it still irks me that I have to …&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Launch Terminal&lt;/li&gt;
&lt;li&gt;Launch Tmux&lt;/li&gt;
&lt;li&gt;Split it into three windows err … panes.&lt;/li&gt;
&lt;li&gt;Go to the top left pane and launch Hugo server&lt;/li&gt;
&lt;li&gt;Switch to the right pane and then launch Emacs with whatever new post I want to write today.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So &lt;em&gt;of course&lt;/em&gt;, a &lt;a href="https://en.wikipedia.org/wiki/Rube_Goldberg" target="_blank" rel="noreferrer"&gt;Rube Goldberg-esque&lt;/a&gt;, tiny bash-pipey monster took form.
It now resides, chained to an alias, &lt;code&gt;hssx&lt;/code&gt;&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; in my &lt;code&gt;.bash_aliases&lt;/code&gt; file&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;alias&lt;/span&gt; &lt;span class="nv"&gt;hssx&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;cd /path/to/my/hugo/folder &amp;amp;&amp;amp; \
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s1"&gt;xdotool windowsize $(xdotool getactivewindow) 100% 100% &amp;amp;&amp;amp; \
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s1"&gt;tmux new-session \; split-window -h \; select-pane -l \; split-window -v \; select-pane -U \; send-keys &amp;#34;hugo serve&amp;#34; C-m \; select-pane -R&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;The first line switches to my hugo folder&lt;/li&gt;
&lt;li&gt;The second calls &lt;code&gt;xdotool&lt;/code&gt; and maximises the terminal window&lt;/li&gt;
&lt;li&gt;And the last line is a series of instructions to the tmux command. I’ve split it below for readability.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tmux new-session \; #Tmux start a new session
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;split-window -h \; # Split the window into two vertical panes
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;select-pane -l \; # Switch to the left pane
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;split-window -v \; # Split that into two horizontal panes
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;select-pane -U \; # Select the upper pane
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;send-keys &amp;#34;hugo serve&amp;#34; C-m \; # Type in `hugo serve` followed by Enter
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;select-pane -R # Select the right pane&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;And boom!&lt;/p&gt;
&lt;/figcaption&gt;
&lt;p&gt;&lt;a href="https://janusworx.com/images/2025/tmux-layout.png" &gt;
&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2025/tmux-layout.png" alt="bash terminal showing a tmux window split into three panes" /&gt;
 
 
 &lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;Click pic for a larger version&lt;/p&gt;
&lt;/figcaption&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post?&lt;br&gt;
Mail me at &lt;a href="mailto:feebdback@janusworx.com?subject=%22Feedback on post: Tmux Start Session Maximized With Three Panes
%22" &gt;feedback at this domain&lt;/a&gt; &lt;em&gt;or&lt;/em&gt; [continue the discourse here][3].
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;&lt;code&gt;hugo start session&lt;/code&gt; and x just because all my aliases have ended with x for years and years&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Notes Now Has No RSS Feed</title><link>https://janusworx.com/work/notes-now-has-no-rss-feed/</link><pubDate>Sat, 04 Jan 2025 16:34:20 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/notes-now-has-no-rss-feed/</guid><description>&lt;p&gt;Finally figured out how to disable RSS feeds on a post by post basis.&lt;/p&gt;
&lt;p&gt;I needed to do this for my stream of consciousness / wip / progress notes in the &lt;a href="https://janusworx.com/nm/" &gt;Notes and Miscellanea&lt;/a&gt; section
I did not want to disable the whole section, because some posts, I do want to leak out.&lt;/p&gt;
&lt;p&gt;What it boiled down to was getting the RSS template to ignore sites with some parameter set in the front matter. Most posts on the web do a &lt;code&gt;rss_disabled: true&lt;/code&gt; or something to that effect.&lt;/p&gt;
&lt;p&gt;Joe Mooring over on the Hugo Discourse &lt;a href="https://discourse.gohugo.io/t/disable-rss-for-one-or-more-specific-posts-in-a-blog/52995/2?u=jasonbraganza" target="_blank" rel="noreferrer"&gt;logically pointed out&lt;/a&gt; that I’d want such posts to be disabled in the sitemap as well, so I’d do well to just piggy back off of that.&lt;/p&gt;
&lt;p&gt;So all I had to do was set the following in the my front matter&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;sitemap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;disable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;and then configure the embedded &lt;a href="https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml" target="_blank" rel="noreferrer"&gt;RSS template&lt;/a&gt;&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; to just range through pages that didn’t have that parameter set, like so …&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-gotmpl" data-lang="gotmpl"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;range&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;where&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;$pages&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;Sitemap.Disable&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;ne&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The original line would’ve been something like&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-gotmpl" data-lang="gotmpl"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;range&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;$pages&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;You’ll need to create a new feed file by copying the contents of the embedded template to a file called &lt;code&gt;rss.xml&lt;/code&gt; in the &lt;code&gt;layouts/_default/&lt;/code&gt; directory&lt;/p&gt;
&lt;p&gt;Once that’s done, all should be hunky dory.&lt;br&gt;
Posts with this frontmatter, will now no longer appear in RSS feeds or the sitemap.&lt;br&gt;
To make things simpler, I edited this sections archetype, so that the next time I create a new Notes &amp;amp; Miscellenea post, all of this metadata is already set for me.&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post?&lt;br&gt;
Mail me at &lt;a href="mailto:feebdback@janusworx.com?subjectFeedback on post: Notes Now Has No RSS Feed
%22" &gt;feedback at this domain&lt;/a&gt; &lt;em&gt;or&lt;/em&gt; [continue the discourse here][3].
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_l_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;If you already have it defined in your theme, then override it.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Some Site Housekeeping (New Sections and RSS Feeds)</title><link>https://janusworx.com/work/some-site-housekeeping-new-sections-and-rss-feeds/</link><pubDate>Sat, 14 Sep 2024 11:36:16 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/some-site-housekeeping-new-sections-and-rss-feeds/</guid><description>&lt;p&gt;&lt;br&gt;

&lt;a href="https://janusworx.com/images/2024/site-housekeeping-new-sections-feeds-1.jpg" &gt;
&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2024/site-housekeeping-new-sections-feeds-1-s.jpg" alt="image of a giant spanner; the size of a tree, lying half embedded in the ground, with the other half in the air" /&gt;
 
 
 &lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;Hard at work, on the site&lt;br&gt;
Click the image, to embiggen&lt;/p&gt;
&lt;/figcaption&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;If you look at the site today, you’ll see that ye olde blog section has disappeared.&lt;br&gt;
I’ve replaced it with three sections, Work, Personal and Reading.&lt;br&gt;
I’ve done this primarily for me.&lt;/p&gt;
&lt;p&gt;While I want all my writing in one place, I want them organised in piles that correspond with the three major modes of my brain.&lt;br&gt;
Work to hold everything I consider work.&lt;br&gt;
Reading for the bookworm in me.&lt;br&gt;
And finally personal for everything else.&lt;/p&gt;
&lt;p&gt;The problem (my problem, in my mind) with the old blog was too much mental whiplash when I read the blog. I would go from poetry to docker to antifragility to photos with every turn of the page.&lt;br&gt;
I didn’t like it.&lt;br&gt;
Ergo, the reorganisation.&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;&lt;a href="https://janusworx.com/images/2024/site-housekeeping-new-sections-feeds-2.jpg" &gt;
&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2024/site-housekeeping-new-sections-feeds-2-s.jpg" alt="image of three large anthromorphic cars. left yellow, centre red and right blue. the centre car is raised on a dias ringed by a giant mechanical nut. the cars are all smiling." /&gt;
 
 
 &lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;Every one in their own pretty place now.&lt;br&gt;
Click the image, to embiggen&lt;/p&gt;
&lt;/figcaption&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;So now, whenever I am browsing my posts in the work section, I see only tech, and computers and docker and programming and all that good stuff.&lt;br&gt;
Same with the personal stuff and the reading.&lt;/p&gt;

&lt;h3 class="relative group"&gt;How does this affect you, my kind and gentle reader?
 &lt;div id="how-does-this-affect-you-my-kind-and-gentle-reader" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#how-does-this-affect-you-my-kind-and-gentle-reader" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;If you are a subscriber to the email list, nothing changes. I know I’ve been lax with updates, but hopefully this reorg should break up the log jam and help me write more.&lt;/li&gt;
&lt;li&gt;If you just come here to the site, once in a while to read through, hopefully, you’ll find it easy just like me, to read posts without too much cognitive whipsawing.&lt;/li&gt;
&lt;li&gt;And finally, if you subscribe via RSS, you my friend are probably affected.&lt;br&gt;
&lt;a href="https://janusworx.com/index.xml" target="_blank" rel="noreferrer"&gt;The main feed&lt;/a&gt;, with all articles, still remains the same, so if you drink from the firehose, nothing changes.&lt;br&gt;
If you’re subscribed to a tag specific feed, like Emacs or DGPLUG, nothing changes.&lt;br&gt;
The only change is that the blog feed has disappeared. In its place are three spanking new feeds, representing my new sections.
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://janusworx.com/work/index.xml" target="_blank" rel="noreferrer"&gt;The Work Feed&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://janusworx.com/personal/index.xml" target="_blank" rel="noreferrer"&gt;The Personal Feed&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://janusworx.com/reading/index.xml" target="_blank" rel="noreferrer"&gt;The Reading Feed&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;And that about does it. &lt;strong&gt;&lt;em&gt;Happy Reading!&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;?subject=%22Feedback on post: Some Site Housekeeping (New Sections and RSS Feeds)
%22" &gt;feedback at this domain&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Using Hugo Variables to Help With Mailto Links in Hugo</title><link>https://janusworx.com/work/using-hugo-variables-to-help-with-mailto-links-in-hugo/</link><pubDate>Thu, 30 May 2024 18:17:35 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/using-hugo-variables-to-help-with-mailto-links-in-hugo/</guid><description>&lt;p&gt;The feedback email address seems to be getting traction and I’m getting more mail every week.&lt;/p&gt;
&lt;p&gt;I wanted to make it easier on myself and for the kind folks who write in, by including the title of the post in the subject of the email.&lt;br&gt;
Right now, every one tells me what post they are talking about, which as I said in exceedingly kind of the folks who write in. My posts seem to be reaching really considerate people :)&lt;/p&gt;
&lt;p&gt;So a teensy bit of head-scratching later, I remembered I use shortcodes to inject custom HTML into my pages. I remembered Hugo has variables I could access. And I remembered &lt;code&gt;mailto&lt;/code&gt; links let me add a subject parameter to the link.&lt;/p&gt;
&lt;p&gt;So, 1+2+3=Sucess! (Or so I hoped)&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;h3 class="relative group"&gt;The How
 &lt;div id="the-how" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-how" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;I looked up the variable, I needed to get at the post’s title. It’s called &lt;code&gt;.Page.Title&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;I created a &lt;code&gt;hpt.html&lt;/code&gt; in my Hugo’s &lt;code&gt;layouts/shortcodes&lt;/code&gt; directory to hold the little snippet that’d get typed in the email’s subject field. This is all it contains:&lt;br&gt;
&lt;code&gt;Feedback on post: {{ .Page.Title }}&lt;/code&gt;&lt;br&gt;
Hugo will grab this snippet whenever it runs and put in the post’s title in place of the placeholder.&lt;/li&gt;
&lt;li&gt;And then I can use that in a &lt;code&gt;mailto&lt;/code&gt; link like so, &lt;code&gt;[feedback at this domain](dummyemail@dummydomain.local?subject=&amp;quot;{{&amp;lt; hpt &amp;gt;}}&amp;quot;)&lt;/code&gt;&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;And tada! 1+2+3 does indeed equal success! You can see in action, by clicking on the link below to send me feedback 🙂&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;?subject=%22Feedback on post: Using Hugo Variables to Help With Mailto Links in Hugo
%22" &gt;feedback at this domain&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;This is a markdown formatted link. You can ofcourse use HTML&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Note to Self Footnotes Using Littlefoot.js</title><link>https://janusworx.com/work/note-to-self-footnotes-using-littlefoot.js/</link><pubDate>Wed, 28 Feb 2024 08:10:36 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/note-to-self-footnotes-using-littlefoot.js/</guid><description>&lt;p&gt;&lt;br&gt;

&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2024/footnotes.png" alt="Two feet side by side, with a marker illustration on them. theres a figure 1 on one foot. a small cartoon lion on the other. and a dashed path drawn across one foot to the other, linking them." /&gt;
 
 
 &lt;/figure&gt;&lt;/p&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;Courtesy &lt;a href="https://flickr.com/photos/dothegreenthing/7401372664/" target="_blank" rel="noreferrer"&gt;dothegreenthing&lt;/a&gt;, &lt;a href="https://creativecommons.org/licenses/by-nc/2.0/" target="_blank" rel="noreferrer"&gt;CC BY-NC 2.0&lt;/a&gt;, on Flickr&lt;/p&gt;
&lt;/figcaption&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

I have this amazing urge never to leave well enough alone.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;
The blog uses an amazing theme, called &lt;a href="https://adityatelange.github.io/hugo-PaperMod/" target="_blank" rel="noreferrer"&gt;PaperMod&lt;/a&gt;.&lt;br&gt;
And ofcourse, like I said, because I can’t leave well enough alone, I’ve customised it heavily.&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;
The fonts are different, there are various kinds of slight colour changes, I bullied &lt;a href="https://github.com/adityatelange" target="_blank" rel="noreferrer"&gt;Aditya&lt;/a&gt; into showing me how to &lt;a href="https://github.com/adityatelange/hugo-PaperMod/issues/62#issuecomment-1375160640" target="_blank" rel="noreferrer"&gt;build a Menu&lt;/a&gt;, there are lots of custom &lt;a href="https://gohugo.io/content-management/shortcodes/" target="_blank" rel="noreferrer"&gt;Hugo shortcodes&lt;/a&gt; and there were footnotes powered by a nifty little Javascript library called &lt;a href="https://littlefoot.js.org/" target="_blank" rel="noreferrer"&gt;littlefoot.js&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now everything &lt;em&gt;was&lt;/em&gt; fine and dandy.&lt;br&gt;
There are folks who &lt;em&gt;do&lt;/em&gt; leave well enough alone. Their blogs stay up and running for years on end, held together with nothing more than spit and baling wire.&lt;br&gt;
Those folks aren’t me, sadly. Aditya keeps improving the theme and I really wanted the new shiny. &lt;a href="https://github.com/adityatelange/hugo-PaperMod/releases/tag/v7.0" target="_blank" rel="noreferrer"&gt;So I went and got it.&lt;/a&gt;&lt;br&gt;
And everything broke!&lt;br&gt;
I got weird artifacts. RSS broke. Fonts broke. Footnotes broke.&lt;sup id="fnref:3"&gt;&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref"&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;I’ve managed to put everything back together, over the past week, and I &lt;em&gt;just&lt;/em&gt; got footnotes working again yesterday.&lt;br&gt;
So a few notes to myself, on what to do, when I break it again.&lt;sup id="fnref:4"&gt;&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref"&gt;4&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;
Footnotes today, and the rest later …&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

So here goes,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The litlefoot.js repo has &lt;a href="https://github.com/goblindegook/littlefoot#usage" target="_blank" rel="noreferrer"&gt;excellent documentation&lt;/a&gt;. That’s where you pulled everything from (for when you wonder, just &lt;em&gt;how&lt;/em&gt; you figured all the CSS out)&lt;/li&gt;
&lt;li&gt;You download a static copy with a &lt;code&gt;npm install --save littlefoot&lt;/code&gt; and then stick it into Hugo’s static folder&lt;/li&gt;
&lt;li&gt;Copy the &lt;code&gt;extend_head.html&lt;/code&gt; from the theme’s &lt;code&gt;layout/partials&lt;/code&gt; into your own. You should already have an &lt;code&gt;extend_footer.html&lt;/code&gt; since you put in PaperMod’s hamburger stuff in there.&lt;/li&gt;
&lt;li&gt;Adapt the &lt;a href="https://github.com/goblindegook/littlefoot#usage-from-a-cdn" target="_blank" rel="noreferrer"&gt;Usage from a CDN&lt;/a&gt; step to directly access it from &lt;code&gt;/littlefoot/dist/…&lt;/code&gt; instead of &lt;a href="https://unpkg.com/" target="_blank" rel="noreferrer"&gt;UNPKG&lt;/a&gt;. Put the CSS link into your &lt;code&gt;extend_head.html&lt;/code&gt; and the JS into &lt;code&gt;extend_footer.html&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;We want the footnotes to be numbers, rather than floating ellipses. So modify the default (blank) script call in &lt;code&gt;extend_footer.html&lt;/code&gt;, to the stuff below. This is verbatim from the docs.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-html" data-lang="html"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;application/javascript&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;littlefoot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;littlefoot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;buttonTemplate&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="sb"&gt;`
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sb"&gt; &amp;lt;button
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sb"&gt; aria-label=&amp;#34;Footnote &amp;lt;% number %&amp;gt;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sb"&gt; class=&amp;#34;littlefoot__button&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sb"&gt; id=&amp;#34;&amp;lt;% reference %&amp;gt;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sb"&gt; title=&amp;#34;See Footnote &amp;lt;% number %&amp;gt;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sb"&gt; /&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sb"&gt; &amp;lt;% number %&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sb"&gt; &amp;lt;/button&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sb"&gt; `&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;We want to style it a teensy bit, so those styles go into &lt;code&gt;extend_head.html&lt;/code&gt;. For some reason, it does not pick the footnote styling correctly when you put stuff into your normal &lt;code&gt;assets/css/extended/&lt;/code&gt; folder.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-css" data-lang="css"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;&amp;lt;!&lt;/span&gt;&lt;span class="nt"&gt;--Custom&lt;/span&gt; &lt;span class="nt"&gt;littlefoot&lt;/span&gt; &lt;span class="nt"&gt;styles--&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;littlefoot&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;		&lt;span class="c"&gt;/*the --attributes come from the littlefoot.js docs*/&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;		&lt;span class="c"&gt;/*Change button background to something that works in both modes*/&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;--button-background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#666&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;		&lt;span class="c"&gt;/*Change padding to make the button rounder*/&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;--button-padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="mf"&gt;0.35&lt;/span&gt;&lt;span class="kt"&gt;rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;		&lt;span class="c"&gt;/*The footnote ought to be italicised*/&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;--popover-font-style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;italic&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;		&lt;span class="c"&gt;/*Make the popover work with my theme’s colour scheme*/&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;--popover-background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;--popover-text-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;primary&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c"&gt;/*the oldstyle numerals used everywhere else, don’t look good here
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;		Neither do they align properly in the box.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;		So switch them to normal*/&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;		&lt;span class="k"&gt;font-variant-numeric&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;normal&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;		&lt;span class="c"&gt;/*Italic numerals for the footnotes*/&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;italic&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;littlefoot__button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;		&lt;span class="c"&gt;/*very subjective. 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;		try to get the numerals centred as much as I can.*/&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;line-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;vertical-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;middle&lt;/span&gt;&lt;span class="cp"&gt;!important&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;Et voilà! Footnotes galore!&lt;/p&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2024/footnotes-2.png" alt="screenshot of a blogpost, with footnotes" /&gt;
 
 
 &lt;/figure&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;It looks a little weird, a little like a billie goat walked across my post, pooping pellets across the page.&lt;sup id="fnref:5"&gt;&lt;a href="#fn:5" class="footnote-ref" role="doc-noteref"&gt;5&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;
But it is my kind of weird now.&lt;br&gt;
And I love it :)&lt;/p&gt;
&lt;/figcaption&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback at this domain&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;what we in the Mumbaiyya vulgar, would call, “Gaand mein keeda”.&lt;br&gt;
&lt;em&gt;&lt;strong&gt;Please for the love of God, don’t look that up. Very not safe.&lt;/strong&gt;&lt;/em&gt;&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;Heavily, as in heavily for a guy who doesn’t quite know what he’s doing.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:3"&gt;
&lt;p&gt;All my fault obviously, with all the custom stuff. Nothing to do with the theme proper.&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:4"&gt;
&lt;p&gt;in the &lt;em&gt;&lt;strong&gt;far, far, far, future&lt;/strong&gt;&lt;/em&gt;; future Jason! Not any time soon, you hear!&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:5"&gt;
&lt;p&gt;“Pooping pellets on the posted page”, Now there’s a tongue twister 😂&amp;#160;&lt;a href="#fnref:5" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Get Hugo to Show Images in Links When Shared on Social Networks</title><link>https://janusworx.com/work/hugo-show-images-in-links-when-shared-on-social-networks/</link><pubDate>Sun, 11 Feb 2024 19:45:52 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/hugo-show-images-in-links-when-shared-on-social-networks/</guid><description>&lt;p&gt;Whenever I post a link to one of my posts on the fediverse or share it with my friends on Signal, I just get a plain vanilla link box
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2024/op-image-on-link-1.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;
&lt;/p&gt;
&lt;p&gt;I wanted those rich embeds, other folk seemed to have, on the same mediums, that I would share my links on.&lt;br&gt;
Looking around for how to go about doing this, led me to &lt;a href="https://ogp.me/" target="_blank" rel="noreferrer"&gt;ogp.me&lt;/a&gt;, which taught me the whys and wherefores.&lt;br&gt;
Looking around, a bit more for how to do this with Hugo, led me to &lt;a href="https://discourse.gohugo.io/t/display-first-image-in-post-in-link-preview/10541/2" target="_blank" rel="noreferrer"&gt;this thread&lt;/a&gt;, which had &lt;a href="https://discourse.gohugo.io/t/display-first-image-in-post-in-link-preview/10541/5" target="_blank" rel="noreferrer"&gt;this helpful comment&lt;/a&gt; by Kaushal Modi, which made be search the Hugo documentation which finally &lt;a href="https://gohugo.io/templates/internal/" target="_blank" rel="noreferrer"&gt;led me here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I figured all I needed to do then was just to link to the image&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; I wanted in the metadata section of my post, like I did for this one.&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Get Hugo to Show Images in Links When Shared on Social Networks&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;date&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ld"&gt;2024-02-11T19:45:52&lt;/span&gt;&lt;span class="m"&gt;+05&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;categories&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;work&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;tags&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;hugo&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;images&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="s2"&gt;&amp;#34;/images/2024/op-image-on-link-2.png&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;br&gt;

&lt;p&gt;Et voilà! Rich image previews on links!&lt;br&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2024/op-image-on-link-2.png" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback at this domain&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;or a list of images, if you so choose&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;I use &lt;code&gt;yaml&lt;/code&gt;. The docs have examples for &lt;code&gt;toml&lt;/code&gt; and &lt;code&gt;json&lt;/code&gt; formats as well&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Viewing Hugo Server Output Remotely</title><link>https://janusworx.com/personal/viewing-hugo-server-remotely/</link><pubDate>Sun, 11 Feb 2024 15:18:13 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/personal/viewing-hugo-server-remotely/</guid><description>&lt;p&gt;I’ve been living a little dangerously when posting stuff on the blog.&lt;br&gt;
While it’s true that I compose my posts locally on my desktop, with a locally installed Hugo, I always catch a ton of things that I miss, &lt;em&gt;after&lt;/em&gt; I publish a post. Nearly every single time.&lt;/p&gt;
&lt;p&gt;So the process then becomes …&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open the post on the server in Emacs (after logging in, via &lt;code&gt;ssh&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Make an edit.&lt;/li&gt;
&lt;li&gt;Build and publish.&lt;/li&gt;
&lt;li&gt;Reload the page and re-read the post.&lt;/li&gt;
&lt;li&gt;Find a typo. Fix it.&lt;/li&gt;
&lt;li&gt;Repeat steps 3 &amp;amp; 4.&lt;/li&gt;
&lt;li&gt;Keep the Emacs pane to keep editing and open &lt;em&gt;another&lt;/em&gt; terminal pane, just to build and deploy.&lt;/li&gt;
&lt;li&gt;Twenty three edits later … Be ok with what I have. (with a build and deploy, and reload and reread every couple of edits)&lt;/li&gt;
&lt;li&gt;Do a final build and deploy&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Having done this, for God knows how long now, I’m used to this workflow and decided to just lean into it.&lt;br&gt;
But while I loved my edit, build, deploy, reload, reread, workflow, I felt like I was tempting &lt;a href="https://en.wikipedia.org/wiki/Moirai#/media/File:The_Three_Fates_by_Paul_Thumann.jpg" target="_blank" rel="noreferrer"&gt;the fates&lt;/a&gt;, everytime I did it. Besides I did not like messing with the live website like that.&lt;/p&gt;
&lt;p&gt;So I wondered, if the way I did it locally, could be kinda sorta done remotely.&lt;br&gt;
When I write posts locally, all I need to do is run &lt;code&gt;hugo server&lt;/code&gt; in a terminal and it spins up a local server, with the all the posts, built and rendered in memory for speedy access.&lt;br&gt;
Could I have that? But remote? Could I run &lt;code&gt;hugo server&lt;/code&gt; on my server and view the results in my browser from anywhere?&lt;br&gt;
About an hour of exploration later, I did have it up and running!&lt;/p&gt;
&lt;p&gt;Here’s what I did, after delving into Hugo’s &lt;a href="https://gohugo.io/commands/hugo_server/" target="_blank" rel="noreferrer"&gt;&lt;code&gt;server&lt;/code&gt;&lt;/a&gt; command options&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Created a subdomain (drpr.janusworx.com) and pointed it to my server. (this is where I’ll see my temporary, work-in-progress, results whenever I run &lt;code&gt;hugo server&lt;/code&gt; on my server)&lt;/li&gt;
&lt;li&gt;Used Nginx as a proxy to point to it. (Also serves as my SSL termination point, freeing Hugo from the burdens of HTTPS/SSL drama)&lt;/li&gt;
&lt;li&gt;Spun up Hugo with &lt;code&gt;hugo serve -D -b https://drpr.janusworx.com --appendPort=false --liveReloadPort=443&lt;/code&gt; where …&lt;br&gt;
a. &lt;code&gt;-D&lt;/code&gt; builds posts marked with drafts&lt;br&gt;
b. &lt;code&gt;-b&lt;/code&gt; tells Hugo the hostname and path to the root of the blog (in my case, &lt;a href="https://drpr.janusworx.com" target="_blank" rel="noreferrer"&gt;https://drpr.janusworx.com&lt;/a&gt;)&lt;br&gt;
c. &lt;code&gt;--appendPort&lt;/code&gt; is set to false, which stops appending the port number to the url (happens by default, http://localhost:1313)&lt;br&gt;
d. &lt;code&gt;--liveReloadPort&lt;/code&gt; is set to my SSL/TLS port, so that I can watch changes live with every edit.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;And everything worked!&lt;br&gt;
Except for the live reloading. That bit just refused to work.
I could make changes and then go manually reload the web page and it would update. &lt;em&gt;&lt;strong&gt;Grr!&lt;/strong&gt;&lt;/em&gt; So near, yet so far!&lt;br&gt;
Some more exploration led to &lt;a href="https://github.com/gohugoio/hugo/issues/2205#issuecomment-498769463" target="_blank" rel="noreferrer"&gt;Pothi Kalimuthu’s extremely helpful comment&lt;/a&gt; on Github …&lt;/p&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2024/hugo-livereload-remote.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;p&gt;Where I realised that Hugo’s LiveReload script (that reflects changes) needs a location in my Nginx config.&lt;br&gt;
So a bit of copying and pasting and adapting and &lt;em&gt;tada!&lt;/em&gt; 🎉&lt;/p&gt;
&lt;p&gt;This blog post was written entirely on the server, with me watching the changes live as they happened …&lt;/p&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2024/hugo-livereload-remote-2.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;p&gt;And once this was done, I could just do a single, final, build and deploy to publish.&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback at this domain&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Huginn: the Rube Goldbergness of Updating Hugo</title><link>https://janusworx.com/work/huginn-the-rube-goldbergness-of-updating-hugo/</link><pubDate>Mon, 13 Mar 2023 19:35:06 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/huginn-the-rube-goldbergness-of-updating-hugo/</guid><description>&lt;p&gt;&lt;br&gt;

&lt;a href="https://janusworx.com/images/2023/rube_goldberg_war_machine_large.jpg" &gt;
&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/rube_goldberg_war_machine_small.jpg" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;Click the pic to embiggen.&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Rube_Goldberg" target="_blank" rel="noreferrer"&gt;Rube Goldberg&lt;/a&gt; illustration via &lt;a href="https://www.flickr.com/photos/x-ray_delta_one/18482076814" target="_blank" rel="noreferrer"&gt;James Vaughan&lt;/a&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;Ended up too sick to even tinker, since I last wrote.&lt;br&gt;
Well enough now, to scratch out some prose to get my brains in gear.&lt;br&gt;
Let’s start with Huginn adventure #1.&lt;br&gt;
Buckle up!&lt;/p&gt;

&lt;h3 class="relative group"&gt;Background
 &lt;div id="background" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#background" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;I found &lt;a href="https://janusworx.com/blog/huginn" &gt;Huginn&lt;/a&gt;, and am using it as my man friday.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;

&lt;h3 class="relative group"&gt;The “Problem”
 &lt;div id="the-problem" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-problem" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;I run Hugo on &lt;del&gt;two&lt;/del&gt; three machines.&lt;br&gt;
I’m tired of updating to the latest release manually.&lt;br&gt;
The computer can do it for me!&lt;/p&gt;

&lt;h3 class="relative group"&gt;Why this way? Why? Why?!
 &lt;div id="why-this-way-why-why" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#why-this-way-why-why" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;It’s fun!&lt;/li&gt;
&lt;li&gt;Yes, there are other (most likely simpler) ways to do it, but Huginn is my new shiny hammer … and well you know!&lt;/li&gt;
&lt;li&gt;Did I tell you it’s fun? :)&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 class="relative group"&gt;How now brown cow?
 &lt;div id="how-now-brown-cow" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#how-now-brown-cow" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Some more background:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I could just &lt;code&gt;apt install&lt;/code&gt;, but I’m too posh for that 😂 I want the &lt;em&gt;latest&lt;/em&gt; version of Hugo. And the &lt;em&gt;extended&lt;/em&gt; version at that.&lt;/li&gt;
&lt;li&gt;I depend on two more helpers.&lt;br&gt;
a. &lt;a href="syncthing.net/" &gt;Syncthing&lt;/a&gt; syncs the folder that the Hugo deb package downloads to, across all my machines&lt;br&gt;
b. Pushover sends me push notifications. Huginn &lt;a href="https://pushover.net/apps" target="_blank" rel="noreferrer"&gt;integrates&lt;/a&gt; with it.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Having said that, here’s a pic of my four step scenario, followed by the output of each step.&lt;/p&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-hugo-0.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;ol&gt;
&lt;li&gt;Scrape the Hugo github releases page to get the title.&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-hugo-1.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;ol start="2"&gt;
&lt;li&gt;Get the latest release title&lt;sup id="fnref:3"&gt;&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref"&gt;3&lt;/a&gt;&lt;/sup&gt; and fashion a url out of it.&lt;/li&gt;
&lt;/ol&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-hugo-2.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;ol start="3"&gt;
&lt;li&gt;Download Hugo to a folder.&lt;br&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-hugo-3.png" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;ol start="4"&gt;
&lt;li&gt;Send myself a push notification.&lt;sup id="fnref:4"&gt;&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref"&gt;4&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-hugo-4.png" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;ol start="5"&gt;
&lt;li&gt;And tada!

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-hugo-5.png" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;So we done? No, you silly goose!&lt;br&gt;
&lt;br&gt;

We’re done downloading the installer. Said installer now needs installing.&lt;br&gt;
So my very imaginatively titled &lt;code&gt;install-hugo.sh&lt;/code&gt; script&lt;sup id="fnref:5"&gt;&lt;a href="#fn:5" class="footnote-ref" role="doc-noteref"&gt;5&lt;/a&gt;&lt;/sup&gt;, which runs once a day via a &lt;code&gt;crontab&lt;/code&gt; entry …&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;takes the file,&lt;/li&gt;
&lt;li&gt;checks to see if it’s downloaded in the last day&lt;/li&gt;
&lt;li&gt;and if so, installs it.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Mind you, it needs root privileges. And then it also …&lt;br&gt;
4. deletes any stray debs more than a few days old.&lt;sup id="fnref:6"&gt;&lt;a href="#fn:6" class="footnote-ref" role="doc-noteref"&gt;6&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;#! /usr/bin/env bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /path/to/hugo/deb/file
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Install deb from the last 24 hours&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;find *.deb -maxdepth &lt;span class="m"&gt;1&lt;/span&gt; -mmin -1440 &lt;span class="p"&gt;|&lt;/span&gt; xargs -d &lt;span class="s1"&gt;&amp;#39;\n&amp;#39;&lt;/span&gt; dpkg -i
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Remove debs more than 2 days old&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;find *.deb -maxdepth &lt;span class="m"&gt;1&lt;/span&gt; -mtime +2 &lt;span class="p"&gt;|&lt;/span&gt; xargs -d &lt;span class="s1"&gt;&amp;#39;\n&amp;#39;&lt;/span&gt; rm -rf &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;And &lt;em&gt;&lt;strong&gt;now&lt;/strong&gt;&lt;/em&gt; we’re done :)&lt;/p&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-hugo-6.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;Holy shiny hammer, Batgirl! It worked!&lt;/p&gt;
&lt;/figcaption&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;The scenario, should you install Huginn and want to import and play with, as well as the shell script are here, &lt;a href="https://github.com/jasonbraganza/huginn-scenarios/tree/main/hugo-update" target="_blank" rel="noreferrer"&gt;on Github&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Note: I had originally used the RSS agent in step one, instead of the Website agent I use now, and that was much easier. But it would detect the new feed entry and then just sit there hatching eggs, not doing anything. I wish I had a snapshot (of the missed events, not hatched eggs) but I digress. The website agent, for all its hacky xpath quackery &lt;em&gt;works.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;it could have been girl friday too, but I call mine Bertuccio, after &lt;a href="https://en.wikipedia.org/wiki/The_Count_of_Monte_Cristo" target="_blank" rel="noreferrer"&gt;Edmond Dantes&lt;/a&gt;’ man friday&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;I cannot believe, I go scrape a website and learn all that xpath voodoo, just to get a measly text string.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:3"&gt;
&lt;p&gt;And here’s where Huginn helps. It remembers the last title. And only proceeds if something has changed.&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:4"&gt;
&lt;p&gt;the push notification is just like that. something whimsical for me. It’s independent of the download. I should probably have called it Step 3a. or 2b. Never mind now.&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:5"&gt;
&lt;p&gt;which is also synced and available across all three machines&amp;#160;&lt;a href="#fnref:5" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:6"&gt;
&lt;p&gt;I let them be for a couple of days, in case a machine is not online that day.&amp;#160;&lt;a href="#fnref:6" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>What I Learned Today (9th of February, 2023)</title><link>https://janusworx.com/personal/what-i-learned-today-2023-02-09/</link><pubDate>Thu, 09 Feb 2023 19:22:28 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/personal/what-i-learned-today-2023-02-09/</guid><description>
&lt;h3 class="relative group"&gt;Regex
 &lt;div id="regex" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#regex" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Started doing regex exercises, so i don’t get bored doing only python. will alternate them for now&lt;/li&gt;
&lt;li&gt;Using Practice Makes Regexp. I have only the book though. It’s now expanded to include video solutions too. Highly recommend any of Reuven’s courses&lt;/li&gt;
&lt;li&gt;Set up environment and did one exercise which was to look up the user’s input in a dictionary (a word dictionary. not a programming dictionary)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;Linux Mint
 &lt;div id="linux-mint" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#linux-mint" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Yesterday’s work was for &lt;a href="https://janusworx.com/blog/what-i-learned-today-2023-02-08/#update" &gt;naught&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;Devops
 &lt;div id="devops" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#devops" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Kubernetes, began doing some exercises&lt;/li&gt;
&lt;li&gt;Set up the environment today&lt;/li&gt;
&lt;li&gt;Spoke with a friend about practicing Ansible / Devops stuff&lt;/li&gt;
&lt;li&gt;Learnt about putting in environment variables into a docker compose file and then using them in a Django container&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;Hugo
 &lt;div id="hugo" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#hugo" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Diddled with the &lt;code&gt;code&lt;/code&gt; element font size on the blog, to make it look a little larger&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;Urdu
 &lt;div id="urdu" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#urdu" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Learnt about the “tashdiid” symbol that helps add emphasis to a consonant&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;Physical Fitness
 &lt;div id="physical-fitness" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#physical-fitness" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Nearing the end of my month long journey.&lt;/li&gt;
&lt;li&gt;Have gotten over the pain hump, but the personal trainer isn’t quite sympatico with my needs. He’s a good egg, but we seem to be talking past each other. Wonder what to do when my time is up mid week next.&lt;/li&gt;
&lt;li&gt;Did legs today. Went well. Jogged 10m after. Walked 30m after that.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;</description></item><item><title>What I Learned Today (8th of February, 2023)</title><link>https://janusworx.com/personal/what-i-learned-today-2023-02-08/</link><pubDate>Wed, 08 Feb 2023 20:20:06 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/personal/what-i-learned-today-2023-02-08/</guid><description>&lt;p&gt;Don’t know if it’s the gym or the regular work beat, but I seem to be waking up later and later everyday. I don’t know what to do about this. I feel a little anxious about not having enough hours in the day.&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;h3 class="relative group"&gt;Python
 &lt;div id="python" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#python" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Why use comprehensions? Because it reads better.&lt;br&gt;
Like I advice the young ones in DPGLUG on writing.&lt;br&gt;
Write short, choppy sentences.&lt;br&gt;
They read better.&lt;/li&gt;
&lt;li&gt;With my problem sets …
&lt;ul&gt;
&lt;li&gt;I should stop trying to generalise in advance and solve the specific problem first.&lt;/li&gt;
&lt;li&gt;Read stuff carefully. Don’t do more than is necessary&lt;/li&gt;
&lt;li&gt;Solutions take time to understand too. Budget the time&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;Linux Mint
 &lt;div id="linux-mint" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#linux-mint" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Nemo, the file browser in Linux Mint always opens the home directory, when I click on it and there’s no apparent way to change it to a preferred directory. I want it to always open &lt;code&gt;Downloads&lt;/code&gt;
&lt;strike&gt;&lt;/li&gt;
&lt;li&gt;A little bit of web spelunking led to an acceptable work-around.
&lt;ol&gt;
&lt;li&gt;Right click the main &lt;code&gt;menu&lt;/code&gt; button&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Menu =&amp;gt; Open the menu editor =&amp;gt; Accessories&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Then click &lt;code&gt;Files&lt;/code&gt; in the items from the right and click &lt;code&gt;Properties&lt;/code&gt; further right&lt;/li&gt;
&lt;li&gt;Change the command form &lt;code&gt;nemo %U&lt;/code&gt; to &lt;code&gt;nemo Downloads&lt;/code&gt;&lt;br&gt;
And that does it!
&lt;/strike&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 class="relative group"&gt;Update
 &lt;div id="update" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#update" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;2023-02-09: Does not work. Will look for some other approach. Right now, with the workaround it opens a &lt;code&gt;Downloads&lt;/code&gt; window alongside any other folder I click on 😂&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;Hugo
 &lt;div id="hugo" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#hugo" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Added a plain, hamburger menu to this blog, using Aditya’s helpful instructions &lt;a href="https://discord.com/channels/971046860317921340/1047919068075802714" target="_blank" rel="noreferrer"&gt;over on the PaperMod Discord&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;With all the extra nav items, I’ve added to the header the menu would overflow on my iPhone (and probably on other folks’ phones too). So if this page scooches narrow enough, it will change the links on top to a plain menu.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;br&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/blog-menu.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;br&gt;
&lt;/p&gt;

&lt;h3 class="relative group"&gt;Huginn / RSS
 &lt;div id="huginn--rss" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#huginn--rss" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;I often have sites that have no RSS feeds, but they’re still interesting enough to me that I want to keep tabs on them for anything new.&lt;/li&gt;
&lt;li&gt;While I wrote a tiny program to scrape and generate a &lt;a href="https://janusworx.com/blog/updated-poemfeed/" target="_blank" rel="noreferrer"&gt;custom RSS feed&lt;/a&gt; to get my &lt;a href="https://www.poetryfoundation.org/poems/poem-of-the-day" target="_blank" rel="noreferrer"&gt;Poetry&lt;/a&gt; fix, I needed something more robust, if I wanted to do this with lots of sites.&lt;/li&gt;
&lt;li&gt;I realised that my Huggin instance &lt;a href="https://blog.andrewcantino.com/blog/2014/04/13/adding-rss-feeds-to-any-site-with-huginn/" target="_blank" rel="noreferrer"&gt;could do that for me&lt;/a&gt;. Huginn is documented pretty well, that even a slowpoke like me, could figure out a fix for himself, inside an hour&lt;/li&gt;
&lt;li&gt;I also learnt something fun. How do I choose a specific, nested, div on the page when all of them are similarly named? By using the power of &lt;a href="https://www.w3schools.com/xml/xpath_intro.asp" target="_blank" rel="noreferrer"&gt;XPath&lt;/a&gt;! I found it to be a more robust way of picking something from a web page, compared to its alternatives.&lt;/li&gt;
&lt;li&gt;It’s also pretty easy to at least get a basic XPath selection. Just inspect your element in your browser’s web inspector and a right/context click should normally give you the option to copy a link as an XPath.
Getting to an &lt;code&gt;href&lt;/code&gt; link in the &lt;code&gt;div&lt;/code&gt; I wanted, led to something like &lt;code&gt;/html/body/div[1]/div[1]/div/div/div/main/div/div[1]/div/header/h2/a/@href&lt;/code&gt; and &lt;em&gt;&lt;strong&gt;BAM!&lt;/strong&gt;&lt;/em&gt; I got the link!&lt;/li&gt;
&lt;li&gt;This solves a really big problem for me. So once again, I’m pretty chuffed today as well :)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;Urdu
 &lt;div id="urdu" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#urdu" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Got done with the “siin” group of letters today.&lt;/li&gt;
&lt;li&gt;It is getting more and more confusing to read, but I’m sure I’ll slowly get over it with practice.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;Physical Fitness
 &lt;div id="physical-fitness" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#physical-fitness" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;More Cardio today&lt;/li&gt;
&lt;li&gt;I’ve gotten comfortable doing an hour of active cardio at around 160, without worrying that my heart would burst. Now to focus on doing the same hour at a slower heart rate, over time.&lt;/li&gt;
&lt;li&gt;The pain’s almost gone. Let’s see what the coming days hold.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;</description></item><item><title>What I Learned Today (6th of February, 2023)</title><link>https://janusworx.com/work/what-i-learned-today-2023-02-06/</link><pubDate>Mon, 06 Feb 2023 19:31:33 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/what-i-learned-today-2023-02-06/</guid><description>&lt;p&gt;Everything went to hell in a handbasket today.&lt;br&gt;
Time was short.&lt;br&gt;
I got up late.&lt;br&gt;
I forgot, I had physio.&lt;br&gt;
So most things got slightly abbreviated or dropped.&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;h3 class="relative group"&gt;Python
 &lt;div id="python" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#python" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Did not complete my assignment.&lt;br&gt;
Flunked it again.&lt;br&gt;
But on the plus side, those 45 minutes were some of the hardest thinking and iterating, I have done in weeks. So there’s that.&lt;br&gt;
And on the plusser&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; side, I am proud of having stopped and then looked for help.&lt;br&gt;
That was my biggest learning for the day.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Hugo
 &lt;div id="hugo" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#hugo" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;I need to write about what I actually did in another post.&lt;br&gt;
But I created a custom Table of Contents for my &lt;a href="https://janusworx.com/reading/" target="_blank" rel="noreferrer"&gt;Reading&lt;/a&gt; page, by hacking my &lt;a href="https://github.com/adityatelange/hugo-PaperMod" target="_blank" rel="noreferrer"&gt;theme’s&lt;/a&gt; template and layout. It was fun.&lt;br&gt;
Long story short, the theme has the ability to create a table of contents by reading all the headers elements in the page. I restricted it to just the &lt;code&gt;H1&lt;/code&gt; and &lt;code&gt;H2&lt;/code&gt; elements.&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;Urdu
 &lt;div id="urdu" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#urdu" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Did the “vaao” group of letters today&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;Physical Fitness
 &lt;div id="physical-fitness" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#physical-fitness" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Did gym &lt;em&gt;and&lt;/em&gt; basic physio for my back.&lt;br&gt;
Wiped out!&lt;/li&gt;
&lt;/ul&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;Yes, that &lt;em&gt;&lt;strong&gt;is&lt;/strong&gt;&lt;/em&gt; the technical term for even more&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;It would have gotten too unwieldy otherwise&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Notes to Self, on Self Hosting Fonts on My Hugo Blog</title><link>https://janusworx.com/work/notes-to-self-on-self-hosting-fonts/</link><pubDate>Sun, 09 Oct 2022 14:32:28 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/notes-to-self-on-self-hosting-fonts/</guid><description>&lt;p&gt;Writing this down, so that I will not struggle the next time&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;, I have to do this.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I use &lt;a href="https://mbtype.com/fonts/valkyrie/" target="_blank" rel="noreferrer"&gt;Valkyrie&lt;/a&gt; for everything on the blog in various weights, except for code and preformatted stuff, which uses &lt;a href="https://github.com/adobe-fonts/source-code-pro" target="_blank" rel="noreferrer"&gt;Source Code Pro Medium&lt;/a&gt;. Both are &lt;a href="https://en.wikipedia.org/wiki/Web_Open_Font_Format" target="_blank" rel="noreferrer"&gt;WOFF2&lt;/a&gt; fonts.&lt;/li&gt;
&lt;li&gt;Anything in Hugo’s &lt;code&gt;assets/css/extended&lt;/code&gt; folder will be picked up by Hugo and &lt;a href="https://discourse.gohugo.io/t/papermod-theme-how-to-add-custom-css/30165/9" target="_blank" rel="noreferrer"&gt;bundled into a single CSS file.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The fonts are in subdirectories in the &lt;code&gt;static/fonts/font-name&lt;/code&gt; folder. Anything in the &lt;code&gt;static&lt;/code&gt; folder shows up at the root of the site. &lt;code&gt;~/mjb/blog/static/images/test.jpg&lt;/code&gt; will become &lt;code&gt;/images/test.jpg&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;I’ve created an &lt;code&gt;embed-font-name.css&lt;/code&gt; file in the &lt;code&gt;css&lt;/code&gt; folder above, with embed instructions generously provided by Matthew Butterick in his font documentation for Valkyrie. I adapted the same for Source Code Pro as well. Here’s a sample of my &lt;code&gt;embed-source-code-pro.css&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;span class="lnt"&gt;8
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-css" data-lang="css"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="k"&gt;font-face&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;font-family&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;Source Code Pro Medium&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;font-style&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;normal&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;font-weight&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;medium&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;font-stretch&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;normal&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;font-display&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;auto&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;src&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;url&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;/fonts/source-code-pro/SourceCodePro-Medium.woff2&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nt"&gt;format&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;woff2&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;ol start="5"&gt;
&lt;li&gt;Finally, I created a &lt;code&gt;zz-include-css.css&lt;/code&gt; file, which I use to overide the default CSS, so I can use my custom fonts. Since it starts with a &lt;em&gt;zz&lt;/em&gt; it comes after the files above, that start with &lt;em&gt;embed&lt;/em&gt;, in the final munged and minified CSS file.&lt;br&gt;
These are my instructions to have most text rendered with Valkyrie and code as Source Code Pro Medium&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-css" data-lang="css"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;#&lt;/span&gt;&lt;span class="nn"&gt;top&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;valkyrie&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-variant&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;oldstyle-nums&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;post-content&lt;/span&gt; &lt;span class="nt"&gt;pre&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;code&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;Source Code Pro Medium&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;medium&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;ol start="6"&gt;
&lt;li&gt;Look! So pretty :)&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;hopefully, never!&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;I figured out what to target by inspecting the final web page in Firefox&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Line Numbers in Hugo Codeblocks</title><link>https://janusworx.com/work/line-numbers-in-hugo-codeblocks/</link><pubDate>Sat, 17 Sep 2022 15:16:19 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/line-numbers-in-hugo-codeblocks/</guid><description>&lt;p&gt;I want my code blocks on the blog to sometimes have line numbers.&lt;br&gt;
Looking at the Hugo docs &lt;a href="https://gohugo.io/content-management/syntax-highlighting/#highlighting-in-code-fences" target="_blank" rel="noreferrer"&gt;here&lt;/a&gt; and &lt;a href="https://gohugo.io/content-management/syntax-highlighting/#highlight-shortcode" target="_blank" rel="noreferrer"&gt;here&lt;/a&gt; led me to the &lt;code&gt;linenos&lt;/code&gt; argument.&lt;/p&gt;
&lt;p&gt;While we’d start our code blocks like &lt;code&gt;(```python)&lt;/code&gt;&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;, all I need more is to add the line number argument like so.&lt;/p&gt;
&lt;p&gt;Vanilla code block …&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt;	“It’s silly to try to escape other people’s faults. 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt;	They are inescapable. Just try to escape your own.”
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt;	— Marcus Aurelius
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt;	&amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt;	“Just that you do the right thing. 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt;	The rest doesn’t matter.” 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt;	– Marcus Aurelius
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt;	&amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Now, using the &lt;code&gt;linenos&lt;/code&gt; option, I can be all fancy to show …&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt;	“It’s silly to try to escape other people’s faults. 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt;	They are inescapable. Just try to escape your own.”
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt;	— Marcus Aurelius
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt;	&amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt;	“Just that you do the right thing. 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt;	The rest doesn’t matter.” 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt;	– Marcus Aurelius
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt;	&amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;All I did was, start my code block with a &lt;code&gt;( ```python {linenos=true} )&lt;/code&gt;&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;Hurrah!&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;don’t type the round brackets, they’re just there, so I can see/show what I am doing.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;once again, ignore the round brackets&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Drafts App Needs Escaping if I Am to Use Hugo Shortcodes</title><link>https://janusworx.com/work/drafts-app-needs-escaping-if-i-am-to-use-hugo-shortcodes/</link><pubDate>Wed, 14 Sep 2022 14:35:09 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/drafts-app-needs-escaping-if-i-am-to-use-hugo-shortcodes/</guid><description>&lt;p&gt;When I &lt;em&gt;finally&lt;/em&gt; figured out how to get &lt;a href="https://janusworx.com/blog/line-breaks-on-my-microblog/" target="_blank" rel="noreferrer"&gt;line breaks working on my microblog&lt;/a&gt;, I ran into another sort of hiccough, when I tried doing that from my phone.&lt;br&gt;
I use the &lt;a href="https://getdrafts.com/" target="_blank" rel="noreferrer"&gt;Drafts app&lt;/a&gt; on my phone and tablet to slice and dice all manner of text and to send it to various locations as I please.&lt;/p&gt;
&lt;p&gt;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.&lt;br&gt;
And everytime I typed my &lt;code&gt;{{&amp;lt; hbr &amp;gt;}}&lt;/code&gt; Hugo shortcode to let me have a line break in that post&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;, it would just publish gibberish&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt; instead of giving me said break.&lt;/p&gt;
&lt;p&gt;A bit of twiddling and experimenting led me to the solution.&lt;br&gt;
If I escaped the leading &lt;code&gt;{&lt;/code&gt; character with a &lt;code&gt;\&lt;/code&gt;, so that I typed &lt;code&gt;\{{&amp;lt; hbr &amp;gt;}}&lt;/code&gt;, it then worked just fine!&lt;/p&gt;
&lt;p&gt;P.P.P.S. I need to &lt;a href="https://liatas.com/posts/escaping-hugo-shortcodes/" target="_blank" rel="noreferrer"&gt;escape my Hugo shortcodes&lt;/a&gt; with &lt;code&gt;/* */&lt;/code&gt; if I want to display them in my posts. Like so, &lt;code&gt;{{/* some-shortcode */}}&lt;/code&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;when it gets published on the blog, that is.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;rather, ascii representations of said characters, but gibberish is the correct technical term&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Line Breaks on My Microblog</title><link>https://janusworx.com/work/line-breaks-on-my-microblog/</link><pubDate>Wed, 31 Aug 2022 21:20:14 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/line-breaks-on-my-microblog/</guid><description>&lt;p&gt;I use a (not quite) &lt;a href="https://moi.janusworx.com" target="_blank" rel="noreferrer"&gt;hidden blog&lt;/a&gt; to collect all sorts of bits and bobs and to (selectively and automatically) publish them to my &lt;a href="https://cb.janusworx.com/jason" target="_blank" rel="noreferrer"&gt;fediverse&lt;/a&gt; or &lt;a href="https://twitter.com/janusworx/" target="_blank" rel="noreferrer"&gt;twitter&lt;/a&gt; accounts.&lt;/p&gt;
&lt;p&gt;The one thing that constantly bugged me, was that it would not accept line breaks to differentiate between paragraphs.&lt;br&gt;
&lt;a href="https://moi.janusworx.com/microposts/20220830192948/" target="_blank" rel="noreferrer"&gt;Like this post, here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I don’t know if it’s my theme or a Hugo thing.&lt;br&gt;
And try as I might, I couldn’t quite figure it out.&lt;br&gt;
Since I don’t quite have the time to dig into the code, I just decided to add a couple of &lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt; tags. And that did the trick! &lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://moi.janusworx.com/microposts/lightness-of-being/" target="_blank" rel="noreferrer"&gt;And now it all looks as it should!&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;I rolled it into a shortcode, which has a &lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt; followed by a couple of spaces, but that is absolutely not necessary&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Setting Canonical URLs in Hugo</title><link>https://janusworx.com/personal/setting-canonical-urls-in-hugo/</link><pubDate>Sun, 17 Jul 2022 21:57:42 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/personal/setting-canonical-urls-in-hugo/</guid><description>&lt;p&gt;I steal quite a bit from other folk, to put on my blog.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;
Case in point, is my last post where I stole the image from &lt;a href="https://janusworx.com/blog/what-is-a-real-book/" &gt;Tom Gauld&lt;/a&gt;.&lt;br&gt;
Or a few Seth Godin posts, somewhere on the blog, that I have posted in their entirety.&lt;/p&gt;
&lt;p&gt;While I do credit them in the post, I wished there was a way, I could programmatically tell the search engines and the bots of the world that I &lt;em&gt;did&lt;/em&gt; in fact, steal from someplace and that they should actually be looking over &lt;em&gt;there&lt;/em&gt; and leading people &lt;em&gt;there.&lt;/em&gt;&lt;br&gt;
A little bit of searching, reavealed that there is in fact, such a way to do it.&lt;br&gt;
It’s called the &lt;a href="https://en.wikipedia.org/wiki/Canonical_link_element" target="_blank" rel="noreferrer"&gt;Canonical URL.&lt;/a&gt;&lt;br&gt;
In a nutshell, it tells the machines to guide folk &lt;em&gt;there&lt;/em&gt;, because that is the source of truth.&lt;/p&gt;
&lt;p&gt;And this is where my &lt;a href="https://janusworx.com/blog/all-about-the-move-to-hugo/" &gt;move to Hugo&lt;/a&gt; came in handy.&lt;br&gt;
Hugo makes doing this a breeze.&lt;br&gt;
The idea revolves around processing a &lt;code&gt;canonical&lt;/code&gt; tag that we add to the front matter of said post.&lt;br&gt;
Like so …&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;canonical&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;the source html link to the original content.&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Now to have Hugo process that, we add the following code snippet to the &lt;code&gt;head&lt;/code&gt; section of our blog’s template.&lt;br&gt;
In my case, I copied &lt;code&gt;head.html&lt;/code&gt; from my theme’s &lt;code&gt;layouts/partials&lt;/code&gt; folder to my own &lt;code&gt;layouts/partials&lt;/code&gt; in the blog’s structure and modified it by adding this code block.&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-html" data-lang="html"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{{- if isset .Params &amp;#34;canonical&amp;#34; -}}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;link&lt;/span&gt; &lt;span class="na"&gt;rel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;canonical&amp;#34;&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;{{ .Params.canonical }}&amp;#34;&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{{- else -}}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;link&lt;/span&gt; &lt;span class="na"&gt;rel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;canonical&amp;#34;&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;{{ .Permalink }}&amp;#34;&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{{- end }}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;And that about does it.&lt;br&gt;
I stole this code snippet from a &lt;a href="https://cloudcannon.com/community/learn/hugo-seo-best-practices/" target="_blank" rel="noreferrer"&gt;CloudCannon blog post.&lt;/a&gt;&lt;br&gt;
And if you check the HTML source for this post of mine, you’ll see that the canonical site, does indeed point to CloudCannon’s site.&lt;/p&gt;
&lt;p&gt;&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;because just being on the web, for as long as I have, I know bitrot is a thing.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;if you do have a canonical line in the post, make sure to comment it out&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>All About the Move to Hugo</title><link>https://janusworx.com/work/all-about-the-move-to-hugo/</link><pubDate>Fri, 13 May 2022 20:00:00 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/all-about-the-move-to-hugo/</guid><description>&lt;p&gt;I &lt;em&gt;finally&lt;/em&gt; got done, moving the blog from Nikola to Hugo today.&lt;br&gt;
I already wrote about &lt;a href="https://janusworx.com/blog/begin-again/" &gt;why&lt;/a&gt; I did it.&lt;br&gt;
These are a few more thoughts about what went into the endeavour; and some colophonesque details.&lt;/p&gt;
&lt;p&gt;One, really small hope, is that it will help me learn &lt;a href="https://go.dev/doc/" target="_blank" rel="noreferrer"&gt;Go.&lt;/a&gt;&lt;br&gt;
The DevOps world that I now seek to enter, speaks Go.&lt;br&gt;
I also, now run two Go programs that are indispensible to me, &lt;a href="https://gohugo.io/" target="_blank" rel="noreferrer"&gt;Hugo&lt;/a&gt; and &lt;a href="https://miniflux.app/" target="_blank" rel="noreferrer"&gt;Miniflux&lt;/a&gt;.&lt;br&gt;
And being the control freak, that I am, I’d love to tweak them to &lt;em&gt;just&lt;/em&gt; how I like it.&lt;br&gt;
Nikola did help learn me Python, after all.&lt;/p&gt;
&lt;p&gt;Speaking of Nikola, I’ve used it for close to &lt;a href="https://janusworx.com/blog//happy-with-the-new-shiny" target="_blank" rel="noreferrer"&gt;four years now&lt;/a&gt;, until I moved.&lt;br&gt;
I was a refugee from a self hosted Ghost install. &lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;
I love it to death.&lt;br&gt;
It’s done all I’ve asked of it … and more.&lt;br&gt;
And it’s been fast and stable all these years.&lt;br&gt;
The community (primarily Chris) have been kind and patient and really helpful.&lt;br&gt;
&lt;a href="https://github.com/getnikola" target="_blank" rel="noreferrer"&gt;Chris and Roberto and the rest of the gang&lt;/a&gt;, have built something rugged and enduring.&lt;/p&gt;
&lt;p&gt;So other than having something fun to do while I was down in the dumps, why did I move to Hugo?&lt;br&gt;
I like to learn by reading.&lt;br&gt;
So other than practicing Go, the best way to learn it would be to read code.&lt;br&gt;
And what better place to read code, than that of the tool I use to write? &lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;Another point, is that I probably outgrew what Nikola gave me out of the box, and customizing it (and learning how to) was something that I just couldn’t quite wrap my head around.&lt;br&gt;
While Hugo is probably the same way and its documentation is not quite as structured as Nikola’s, it &lt;em&gt;is&lt;/em&gt; pretty popular and I can get answers to what I want to do, really, really quickly. &lt;sup id="fnref:3"&gt;&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref"&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;
And Hugo has an &lt;a href="https://www.manning.com/books/hugo-in-action" target="_blank" rel="noreferrer"&gt;awesome book&lt;/a&gt;, to learn from.&lt;/p&gt;
&lt;p&gt;So, how did the move go?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I wrote a tiny bespoke Python script, &lt;sup id="fnref:4"&gt;&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref"&gt;4&lt;/a&gt;&lt;/sup&gt; to convert all my Nikola front matter to Hugo front matter.&lt;/li&gt;
&lt;li&gt;That took me half a day, but it converted 677 posts, that I was dreading, I’d have to do by hand and would take me &lt;em&gt;weeks.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;I wrote another bespoke script to convert some gnarly tags that Hugo choked on.&lt;/li&gt;
&lt;li&gt;And just like that, my biggest boulder just fell into place.&lt;/li&gt;
&lt;li&gt;That left me free to write a couple of what Hugo calls, &lt;a href="https://gohugo.io/content-management/shortcodes/#what-a-shortcode-is" target="_blank" rel="noreferrer"&gt;Shortcodes&lt;/a&gt;, to ease my writing.&lt;/li&gt;
&lt;li&gt;I started with shortcode (a custom horizontal rule) and ended up with &lt;em&gt;four!&lt;/em&gt; &lt;sup id="fnref:5"&gt;&lt;a href="#fn:5" class="footnote-ref" role="doc-noteref"&gt;5&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;li&gt;I customised the base as well as the theme’s config to make the site look like I wanted it; &lt;a href="https://github.com/adityatelange/hugo-PaperMod/wiki/Installation#sample-configyml" target="_blank" rel="noreferrer"&gt;&lt;em&gt;(from its various options.)&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;And I added some custom CSS, to have custom horizontal rule and footnote styles, change the look of the links in the menu up top, style my subscribe form, and&lt;/li&gt;
&lt;li&gt;Included the &lt;em&gt;&lt;strong&gt;beautiful&lt;/strong&gt;&lt;/em&gt; font you are reading this in.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In a word, slow, steady, iterative progress until I was done.&lt;/p&gt;
&lt;p&gt;And who and what inspired me and who do I owe gratitude to?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.psaggu.com/" target="_blank" rel="noreferrer"&gt;Priyanka Saggu&lt;/a&gt;, for egging me on to do this project.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://geeksocket.in/" target="_blank" rel="noreferrer"&gt;Bhavin Gandhi&lt;/a&gt; turned me onto the awesomeness that was Hugo.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pradyunsg.me/" target="_blank" rel="noreferrer"&gt;Pradyun Gedam&lt;/a&gt; for making me green with envy, with his minimalistic blog and the thoughtful touches he made. &lt;sup id="fnref:6"&gt;&lt;a href="#fn:6" class="footnote-ref" role="doc-noteref"&gt;6&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://navendu.me/" target="_blank" rel="noreferrer"&gt;Navendu Pottekkat&lt;/a&gt;, &lt;a href="https://github.com/navendu-pottekkat/navendu-pottekkat.github.io" target="_blank" rel="noreferrer"&gt;whose code&lt;/a&gt;, &lt;del&gt;I stole&lt;/del&gt; helped me style my subscribe page.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://bep.is/en/" target="_blank" rel="noreferrer"&gt;Bjørn Erik Pedersen&lt;/a&gt; and &lt;a href="https://spf13.com/" target="_blank" rel="noreferrer"&gt;Steve Francia&lt;/a&gt; and the rest of the gang, for making Hugo&lt;/li&gt;
&lt;li&gt;&lt;a href="https://adityatelange.in/" target="_blank" rel="noreferrer"&gt;Aditya Telange&lt;/a&gt;, for the making the pretty, pretty, little &lt;a href="https://adityatelange.github.io/hugo-PaperMod/" target="_blank" rel="noreferrer"&gt;PaperMod theme.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kushaldas.in/" target="_blank" rel="noreferrer"&gt;Kushal Das&lt;/a&gt;, for sharing my love of typography and beating me to a custom font on his website.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://matthewbutterick.com/" target="_blank" rel="noreferrer"&gt;Matthew Butterick&lt;/a&gt;, for the gorgeousness, that is &lt;a href="https://mbtype.com/fonts/valkyrie/sample.html" target="_blank" rel="noreferrer"&gt;Valkyrie&lt;/a&gt;. The site originally used the beautiful &lt;a href="https://tug.org/FontCatalogue/charterbt/" target="_blank" rel="noreferrer"&gt;Charter&lt;/a&gt;, but while it looked fetching on Windows and MacOS, it would not render as nicely on Linux machines. &lt;sup id="fnref:7"&gt;&lt;a href="#fn:7" class="footnote-ref" role="doc-noteref"&gt;7&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;
With Valkyrie, that no longer is the case. I have something beautiful to look at, all day! &lt;sup id="fnref:8"&gt;&lt;a href="#fn:8" class="footnote-ref" role="doc-noteref"&gt;8&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ratz.com/" target="_blank" rel="noreferrer"&gt;Robin Williams&lt;/a&gt;, for teaching me all about &lt;a href="https://creativemarket.com/blog/how-crap-will-make-you-a-better-designer" target="_blank" rel="noreferrer"&gt;CRAP&lt;/a&gt; and everthing I know about type and design.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;They decided to move their editor away from being purely Markdown. I get why they did it. But it just wasn’t for me. I wanted something simple.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;sorta kinda, like learning about cars, by looking under the hood of your own car, &lt;a href="https://youtu.be/KBnNgI1Icu4" target="_blank" rel="noreferrer"&gt;like in the old days&lt;/a&gt;&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:3"&gt;
&lt;p&gt;even with something as weird and esoteric as the site refusing to build, because of &lt;a href="https://github.com/gohugoio/hugo/issues/6526#issuecomment-578579949" target="_blank" rel="noreferrer"&gt;emacs crapping in the content folder&lt;/a&gt;&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:4"&gt;
&lt;p&gt;related post coming later …&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:5"&gt;
&lt;p&gt;the aforementioned horizontal rule, two to center images and captions and one for my subscription ask at the bottom of the post.&amp;#160;&lt;a href="#fnref:5" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:6"&gt;
&lt;p&gt;Nearly everything I did here, I cribbed from his &lt;a href="https://github.com/pradyunsg/pradyunsg.github.io/blob/main/config.toml" target="_blank" rel="noreferrer"&gt;blog config&lt;/a&gt;&amp;#160;&lt;a href="#fnref:6" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:7"&gt;
&lt;p&gt;which ofcourse, is where I spend my entire day.&amp;#160;&lt;a href="#fnref:7" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:8"&gt;
&lt;p&gt;I was hesitant to plonk down the money for Valkyrie. But I forgot all about that, once I saw my words rendered in the font. So, I am chalking this down to an investment. Besides Matthew’s prices are value for money (I’m just a little broke at the moment, hence the quibbling) and his usage license is generous.&amp;#160;&lt;a href="#fnref:8" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Begin Again</title><link>https://janusworx.com/work/begin-again/</link><pubDate>Fri, 06 May 2022 20:23:09 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/begin-again/</guid><description>&lt;p&gt;Moved over from Nikola, to Hugo today.&lt;/p&gt;
&lt;p&gt;In two minds about what to do with all the old posts.
Do I just shed them all, like I’ve done in the past?
Or work to move them over?&lt;/p&gt;
&lt;p&gt;Maybe, tomorrow’ll bring clarity.&lt;/p&gt;
&lt;p&gt;In the meanwhile, this is a house under construction, y’all!&lt;br&gt;
Stuff does not work, stuff looks wonky, and stuff both, looks wonky and doesn’t work.&lt;br&gt;
I’ll be at it, on and off, over the next few weeks, trying to make this home.&lt;/p&gt;
&lt;p&gt;Why did I do this?&lt;br&gt;
Because I’ve been in a disheartening rut of sorts.&lt;br&gt;
The long slog, to switching careers and all the learning that goes with it, is weighing me down.&lt;br&gt;
So I wanted to do something fun.&lt;br&gt;
Ergo, Hugo’s my new toy.&lt;/p&gt;
&lt;p&gt;The blog looks the way it does, thanks to the good people at &lt;a href="https://gohugo.io/" target="_blank" rel="noreferrer"&gt;Hugo Headquarters&lt;/a&gt; and Aditya Telange’s &lt;a href="https://github.com/adityatelange/hugo-PaperMod" target="_blank" rel="noreferrer"&gt;PaperMod&lt;/a&gt;.&lt;br&gt;
And I know of all this fanciness, thanks to my two young friends who run Hugo themselves, &lt;a href="https://geeksocket.in/" target="_blank" rel="noreferrer"&gt;Bhavin Gandhi&lt;/a&gt;, and &lt;a href="https://pradyunsg.me/" target="_blank" rel="noreferrer"&gt;Pradyun Gedam&lt;/a&gt;.&lt;/p&gt;</description></item></channel></rss>