<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Musings, Rants, &amp; Other Matters</title>
    <link>https://rob.loci.net/tags/hugo/index.xml</link>
    <description>Recent content on Musings, Rants, &amp; Other Matters</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <managingEditor>rob@Loci.net (Rob Arnold)</managingEditor>
    <webMaster>rob@Loci.net (Rob Arnold)</webMaster>
    <copyright>All content &amp;copy 2016 Rob Arnold.</copyright>
    <atom:link href="https://rob.loci.net/tags/hugo/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>Site TODO</title>
      <link>https://rob.loci.net/post/Site-todo/</link>
      <pubDate>Tue, 09 Aug 2016 00:00:00 +0000</pubDate>
      <author>rob@Loci.net (Rob Arnold)</author>
      <guid>https://rob.loci.net/post/Site-todo/</guid>
      <description>

&lt;h2 id=&#34;todo&#34;&gt;TODO:&lt;/h2&gt;

&lt;h3 id=&#34;site-plumbing&#34;&gt;Site plumbing&lt;/h3&gt;

&lt;ul class=&#34;task-list&#34;&gt;
&lt;li&gt;&lt;input type=&#34;checkbox&#34; checked disabled class=&#34;task-list-item&#34;&gt; fix CI for gitlab vs. netlify&lt;/li&gt;
&lt;li&gt;&lt;input type=&#34;checkbox&#34; disabled class=&#34;task-list-item&#34;&gt; create a preview workflow for deployed content, not just hugo server (netlify git branch support or deploy preview feature - gitlab equiv?)&lt;/li&gt;
&lt;li&gt;&lt;input type=&#34;checkbox&#34; disabled class=&#34;task-list-item&#34;&gt; rss setup properly?&lt;/li&gt;
&lt;li&gt;[-] site search (via Google) &lt;del&gt;broken:  fix&lt;/del&gt; [fixed but still consider] or do differently, static&amp;hellip;  at least look at css integration similar to google powered search at &lt;a href=&#34;https://stiobhart.net&#34;&gt;https://stiobhart.net&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;input type=&#34;checkbox&#34; checked disabled class=&#34;task-list-item&#34;&gt; analytics&lt;/li&gt;
&lt;li&gt;&lt;input type=&#34;checkbox&#34; checked disabled class=&#34;task-list-item&#34;&gt; base url for netlify deploy vs config.toml&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&#34;external-or-not-services-additions&#34;&gt;External (or not) services, additions&lt;/h3&gt;

&lt;ul class=&#34;task-list&#34;&gt;
&lt;li&gt;&lt;input type=&#34;checkbox&#34; checked disabled class=&#34;task-list-item&#34;&gt; Disqus fix - &amp;ldquo;unable to load&amp;rdquo; (also, improve js variable use so comment threads don&amp;rsquo;t proliferate across gitlab/selfserve/netlify, and http vs. https URL variants

&lt;ul&gt;
&lt;li&gt;issue was a relative url for the disqus_url js variable.  Base url being set fully would fix it, but doesn&amp;rsquo;t fix deployment under multiple sites causing independent threads, so need to consider best way to fully fix - for now, baseURL is set and the main site is good, plus gitlab version still seems to pull from same comment threads, so maybe a non issue.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;[-] check netlify cms progress

&lt;ul&gt;
&lt;li&gt;looked at their linked demo - looks early still, but maybe it doesn&amp;rsquo;t reflect their actual progress&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;input type=&#34;checkbox&#34; disabled class=&#34;task-list-item&#34;&gt; integrate, eval prose.io&lt;/li&gt;
&lt;li&gt;&lt;input type=&#34;checkbox&#34; disabled class=&#34;task-list-item&#34;&gt; keep researching and trying 100% client side edit/cms type options&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&#34;theme-related&#34;&gt;Theme related&lt;/h3&gt;

&lt;ul class=&#34;task-list&#34;&gt;
&lt;li&gt;&lt;input type=&#34;checkbox&#34; checked disabled class=&#34;task-list-item&#34;&gt; create a tag footer display like category footer&lt;/li&gt;
&lt;li&gt;[-] check font, try options

&lt;ul&gt;
&lt;li&gt;Is the same font as used in the HTML5UP theme - the color is full black whereas the base theme was grayer.  Have some other fonts to try still.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;input type=&#34;checkbox&#34; disabled class=&#34;task-list-item&#34;&gt; continue fixing remaining URL assumption issues&lt;/li&gt;
&lt;li&gt;&lt;input type=&#34;checkbox&#34; disabled class=&#34;task-list-item&#34;&gt; category/tag - the age old do I need both?  Nesting?  Kind of would like a category landing page with a templated description&lt;/li&gt;
&lt;li&gt;&lt;input type=&#34;checkbox&#34; disabled class=&#34;task-list-item&#34;&gt; series in taxonomy to create ordered groups of related posts&lt;/li&gt;
&lt;li&gt;&lt;input type=&#34;checkbox&#34; checked disabled class=&#34;task-list-item&#34;&gt; whitespace/margins around list items - seems a little excessive to me.  Would like to see them closer together [update: theme whitespace tweaked - will see how this feels for a while]&lt;/li&gt;
&lt;li&gt;post ordering - isn&amp;rsquo;t sorting by date / reverse date, maybe mod time on file timestamp?&lt;/li&gt;
&lt;li&gt;links in the theme seem to break out of https -&amp;gt; http.

&lt;ul&gt;
&lt;li&gt;it&amp;rsquo;s doing what it&amp;rsquo;s told - consider using RelPermalink instead of Permalink, etc.?&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&#34;and-stuff&#34;&gt;&amp;hellip; and stuff&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;post scheduling and ordering and the whole concept.  Truth is, I don&amp;rsquo;t care very much about the blog aspect, so much as the wiki/collected, linked thoughts aspect.  The blog part is little more than a recent changes callout type feature to me.  That said, the more ephemeral and random thoughts type stuff definitely fits in more of a blog format.&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
    <item>
      <title>Notes on Site Build and Deploy</title>
      <link>https://rob.loci.net/post/Build-and-deploy-notes/</link>
      <pubDate>Fri, 05 Aug 2016 00:00:00 +0000</pubDate>
      <author>rob@Loci.net (Rob Arnold)</author>
      <guid>https://rob.loci.net/post/Build-and-deploy-notes/</guid>
      <description>&lt;p&gt;So I thought that as I created a Hugo based site, I&amp;rsquo;d keep running notes of what issues I encountered and what I did about them.  That way later on I could refer back to know what the hell I was thinking when &lt;em&gt;x&lt;/em&gt; came up.&lt;/p&gt;

&lt;p&gt;Then I charged forward, did most of the research on tablet, and just otherwise completely ignored my plan.&lt;/p&gt;

&lt;p&gt;So instead, here&amp;rsquo;s my recollection of a few things that I do sort of recall&amp;hellip;
&lt;/p&gt;

&lt;h2 id=&#34;notes&#34;&gt;Notes&lt;/h2&gt;

&lt;h3 id=&#34;site-relative-vs-relative-root-urls&#34;&gt;site relative vs. relative root URLs&lt;/h3&gt;

&lt;p&gt;One of the biggest issues I ran across were some theme files had URL references in them to project files, like css or js, etc., that were given as root relative urls, eg. &lt;code&gt;ref=&amp;quot;/css/somestyle.css&amp;quot;&lt;/code&gt;
Similar issues occured when themes would create their own url to a post, category, etc.
Fixes generally involved using the hugo RelURL function.&lt;/p&gt;

&lt;h3 id=&#34;baseurl&#34;&gt;baseURL&lt;/h3&gt;

&lt;p&gt;In my hugo site directory, I had intended to keep the baseURL as &amp;ldquo;/&amp;rdquo; as many themes and articles I&amp;rsquo;d read suggested.  Hugo server itself ignores the setting by default when running locally, but since I wasn&amp;rsquo;t sure where (all) I&amp;rsquo;d be deploying to anyway, it seemed to me like keeping everything relative was a good thing.  Unfortunately, I found that I needed to set the baseURL more fully for a couple reasons.&lt;/p&gt;

&lt;p&gt;In the case of netlify and gitlab/github user sites, it almost worked to use &lt;code&gt;/&lt;/code&gt;, but due to the way the internal template for integrating disqus provides the url (using the .Permalink variable), if baseURL is relative, then so will be the url provided to disqus, which keeps it from embedding properly.&lt;/p&gt;

&lt;p&gt;In the case of gitlab and github project sites, the site URL becomes something like &lt;code&gt;http://name.gitlab.io/project/&lt;/code&gt; so having the baseURL as &lt;code&gt;/&lt;/code&gt; led to bad links.  Obvious now, but I for some reason just thought everything would magically work with &lt;code&gt;/&lt;/code&gt; getting interpreted as project root and the site somehow knowing to prepend the directory part of the initial url.  Stopping to think about it though - don&amp;rsquo;t see how it could.  I suppose this partly goes back to root relative urls getting peppered through things vs. more disciplined usage of relative urls.&lt;/p&gt;

&lt;p&gt;Regardless, the easy fix in both deploy situations was to use the hugo command line base url arg, like so:
  &lt;code&gt;-baseURL=https://myorg.gitlab.io/projectname/&lt;/code&gt;, in my CI build instructions. That was stuck in &lt;code&gt;.gitlab-ci.yml&lt;/code&gt; in my case for gitlab.&lt;/p&gt;

&lt;p&gt;and
  &lt;code&gt;-baseURL=https://rob.loc.net/&lt;/code&gt;
for netlify.&lt;/p&gt;

&lt;p&gt;I am still not sure I should be putting the http(s): part in the url, but I saw no examples with anything that was just like &lt;code&gt;//rob.loci.net/&lt;/code&gt;.  It seems to work as far as basic site gen with hugo is concerned, but disqus still won&amp;rsquo;t load with it not having the http: or https: at the start.&lt;/p&gt;

&lt;p&gt;I thought I ran into an issue with not having a trailing slash on baseURL, at least in the config.toml, though it seemed to work fine using &lt;code&gt;--baseURL=mymachinename.local&lt;/code&gt; with hugo server on the command line, so not sure if it always in all cases adds a &lt;code&gt;/&lt;/code&gt; if one isn&amp;rsquo;t already on the baseURL, or not.&lt;/p&gt;

&lt;h3 id=&#34;other-gitlab-ci-and-netlify-deploy-notes&#34;&gt;Other Gitlab CI and Netlify deploy notes:&lt;/h3&gt;

&lt;p&gt;The most popular Hugo Docker image &lt;code&gt;publysher/hugo&lt;/code&gt; was recently updated to latest hugo and includes git, but examples exist to use a small base image then manually add hugo should the need arise.&lt;/p&gt;

&lt;h4 id=&#34;git-submodules&#34;&gt;Git submodules&lt;/h4&gt;

&lt;p&gt;I have a git submodule in my project.  It contains the theme, which I host separately on github as a fork from the original dev.  I found that while netlify automatically pulled the submodule contents during it&amp;rsquo;s build step (kudos to &lt;a href=&#34;//netlify.com&#34;&gt;netlify&lt;/a&gt; on that 👍), gitlab does not.  However, since current versions of the docker image contain git, I was able to just do this in my &lt;code&gt;.gitlab-ci.yml&lt;/code&gt; script:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-yml&#34;&gt;image: publysher/hugo

pages:
    script:
    - git submodule update --init --recursive
    - hugo --baseURL=&amp;quot;https://intelligence.gitlab.io/musings/&amp;quot;
    artifacts:
      paths:
      - public
    only:
    - master
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;There are alternate approaches to do it in a before-script section.  Since there&amp;rsquo;s just one job, I didn&amp;rsquo;t see any difference.&lt;/p&gt;

&lt;h4 id=&#34;checking-progress-was-easy-on-both-platforms&#34;&gt;Checking progress was easy on both platforms.&lt;/h4&gt;

&lt;p&gt;Just go to the pipeline view in gitlab, click on the build status button, and you can see it running live.  Cool.&lt;/p&gt;

&lt;p&gt;On Netlify, same sort of thing, but is even simpler.  It&amp;rsquo;s a nice interface.&lt;/p&gt;

&lt;h4 id=&#34;netlify-setup&#34;&gt;Netlify setup&lt;/h4&gt;

&lt;p&gt;In general, I&amp;rsquo;m really impressed with netlify.  They have a pretty polished setup.  I still have to go through the hooks and triggers stuff to try out the &lt;a href=&#34;https://www.netlify.com/blog/2016/07/20/introducing-deploy-previews&#34;&gt;deploy preview&lt;/a&gt; stuff with slack, etc. integration. And I&amp;rsquo;d like to try out the Pro tier&amp;rsquo;s git branch support.  It&amp;rsquo;d be nice if there were ez-button type help with some of those integrations similar to what they have with the rest of site setup, but not sure how possible that&amp;rsquo;d be.
update:  I set up notifications, etc. and it was pretty straightforward.&lt;/p&gt;

&lt;p&gt;I am trying out their pro plan using the new (awesome) free for non-commercial / open source feature.  I note that they don&amp;rsquo;t have password support show up on their dashboard like they are supposed to - I haven&amp;rsquo;t contacted them about it.  I am guessing they took that out of the pro tier if you are using it for free.  Too bad, because I can definitely see it being useful for branch-deploys in particular as well as internal portions of a site.&lt;/p&gt;

&lt;h3 id=&#34;other-notes&#34;&gt;Other notes&lt;/h3&gt;

&lt;h4 id=&#34;hugo-on-sierra&#34;&gt;Hugo on Sierra&lt;/h4&gt;

&lt;p&gt;Turns out the 4th beta of Sierra broke go for a while, which in turn breaks Hugo.&lt;/p&gt;

&lt;p&gt;I started having lots of issues with livereloading and hugo crashing during site (re)gen, to the point where I&amp;rsquo;d have to rerun the &lt;code&gt;hugo server&lt;/code&gt; command after most changes, and run it more than once often, till it got through without crashing.&lt;/p&gt;

&lt;p&gt;I had installed using brew, but I couldn&amp;rsquo;t really (easily) use it to update to a patched version of go because it had to be applied manually.  I ended up installing a binary build from the Go site, which worked fine, but then wouldn&amp;rsquo;t work with brew to allow me to recompile Hugo.  I&amp;rsquo;m sure I could have figured that out if I had more brew packaging and use experience, but since I used brew to make it easier, I didn&amp;rsquo;t want to take the time to do that vs. just get back to work.  So I used go&amp;rsquo;s package facility to grab, build, and install hugo and it was pretty painless.&lt;/p&gt;

&lt;h4 id=&#34;hugo-config-toml-differences&#34;&gt;Hugo config.toml differences&lt;/h4&gt;

&lt;p&gt;When trying out different themes, one annoying thing I discovered were different themes using varying ways of specifying commonly used options in the config.toml.  For example, author info, copyright info, site description/about type stuff, social integration&lt;/p&gt;

&lt;p&gt;Different themes obviously are going to have different configuration needs, but it&amp;rsquo;d be nice to see more common, best practice, type suggestions in the Hugo docs and to have theme authors pay more attention to them.&lt;/p&gt;

&lt;h4 id=&#34;hugo-shortcodes&#34;&gt;Hugo shortcodes&lt;/h4&gt;

&lt;p&gt;Odd thing I came across.  I started using a blockquote shortcode and noticed if I didn&amp;rsquo;t have the named params (or at least the link param) followed by an &lt;code&gt;=&lt;/code&gt; with no space between them, it would throw an error and not render the rest of the page.  The error was (for example):&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ERROR: 2016/08/13 11:14:52 shortcode.go:287: AI-Q&amp;amp;A-Yann-LeCun:19: got positional parameter &#39;link&#39;. Cannot mix named and positional parameters&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I didn&amp;rsquo;t think whitespace should matter like that, but haven&amp;rsquo;t tracked down if it&amp;rsquo;s my misunderstanding, or something odd about that shortcode in particular.&lt;/p&gt;

&lt;h4 id=&#34;other-links-etc&#34;&gt;Other links, etc.&lt;/h4&gt;

&lt;p&gt;So many that I used before starting to take notes&amp;hellip;
Maybe I&amp;rsquo;ll get them in here eventually.&lt;/p&gt;

&lt;p&gt;The Hugo docs site and discussion forums were great.  So were the github Hugo issues page.&lt;/p&gt;

&lt;p&gt;&lt;a href=&#34;http://viewfinderdesign.co.uk/archive/674/tips-for-building-a-site-with-hugo/&#34;&gt;http://viewfinderdesign.co.uk/archive/674/tips-for-building-a-site-with-hugo/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&#34;http://atchai.com/blog/the-cms-is-dead-long-live-hugo-wercker-proseio-and-cloudfront/&#34;&gt;http://atchai.com/blog/the-cms-is-dead-long-live-hugo-wercker-proseio-and-cloudfront/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&#34;http://zackofalltrades.com/notes/2014/05/hugo-from-scratch/&#34;&gt;http://zackofalltrades.com/notes/2014/05/hugo-from-scratch/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There were many others, including many that were extremely helpful.  As I revisit them, I&amp;rsquo;ll try to remember to add them to the post.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Hugo, Shortcodes, &amp; XKCD refs</title>
      <link>https://rob.loci.net/post/HugoShortcodesXKCD/</link>
      <pubDate>Sun, 24 Jul 2016 00:00:00 +0000</pubDate>
      <author>rob@Loci.net (Rob Arnold)</author>
      <guid>https://rob.loci.net/post/HugoShortcodesXKCD/</guid>
      <description>&lt;p&gt;Way back when I started with hugo, a few days ago, I said in &lt;a href=&#34;https://rob.loci.net/post/Tell-me-what-you-want/&#34;&gt;this post&lt;/a&gt; that I really liked the &lt;a href=&#34;http://xkcd.com&#34;&gt;xkcd&lt;/a&gt; footnote/reference popup/popover things&lt;span class=&#34;ref&#34;&gt;&lt;span class=&#34;refnum&#34;&gt;[1]&lt;/span&gt;&lt;span class=&#34;refbody&#34;&gt;Like this!&lt;/span&gt;&lt;/span&gt; he uses in his &lt;a href=&#34;http://what-if.xkcd.com&#34;&gt;&amp;ldquo;what if?&amp;rdquo;&lt;/a&gt; posts.&lt;/p&gt;

&lt;p&gt;I decided to try to add them to &lt;a href=&#34;https://gohugo.io&#34;&gt;Hugo&lt;/a&gt;, first just as part of a theme, then make it easier to use them by making a &lt;a href=&#34;https://gohugo.io/extras/shortcodes/&#34;&gt;shortcode&lt;/a&gt; for them.

After many travails&lt;span class=&#34;ref&#34;&gt;&lt;span class=&#34;refnum&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;refbody&#34;&gt;mostly due to either span/div hover issues with iOS, or history issues with an approach using anchor refs&lt;/span&gt;&lt;/span&gt;
 with a pure css approach, I realized that jQuery was already loaded in the theme I was using anyway, and that using the same approach they used would be simple and easy, and work on mobile as well as desktop (one of the issues I had with some pure CSS approaches)&lt;/p&gt;

&lt;p&gt;After getting the span based html/css/js version working I went on to making a shortcode version so I could do something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;{{% refpo &amp;quot;[1]&amp;quot; &amp;quot;Like this!&amp;quot; %}}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;vs. this&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;span class=&amp;quot;ref&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;refnum&amp;quot;&amp;gt;[1]&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;refbody&amp;quot;&amp;gt;Like this!&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If the popup should have a larger chunk of text, links, etc. arbitrary markdown or html, I could do this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;{{% refpo &amp;quot;[2]&amp;quot; %}}Lots of stuff, with [links](http://www.xkcd.com) and some html &amp;lt;i&amp;gt;italic tags&amp;lt;/i&amp;gt; etc.{{% /refpo %}}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Which would give me this&lt;span class=&#34;ref&#34;&gt;&lt;span class=&#34;refnum&#34;&gt;[2]&lt;/span&gt;&lt;span class=&#34;refbody&#34;&gt;Lots of stuff, with &lt;a href=&#34;http://www.xkcd.com&#34;&gt;links&lt;/a&gt; and some html &lt;i&gt;italic tags&lt;/i&gt; etc.&lt;/span&gt;&lt;/span&gt;
.&lt;/p&gt;

&lt;p&gt;That is useful because Markdown isn&amp;rsquo;t rendered in the 2nd arg in the single shortcode version, though html is.  For example same as above in single version&lt;span class=&#34;ref&#34;&gt;&lt;span class=&#34;refnum&#34;&gt;[3]&lt;/span&gt;&lt;span class=&#34;refbody&#34;&gt;Lots of stuff, with [links](http://www.xkcd.com) and some html &lt;i&gt;italic tags&lt;/i&gt; etc.&lt;/span&gt;&lt;/span&gt;
.&lt;/p&gt;

&lt;p&gt;Unfortunately, I ran into an issue where the non-paired version of the shortcode causes extra &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tags to be placed around some of the shortcodes.&lt;span class=&#34;ref&#34;&gt;&lt;span class=&#34;refnum&#34;&gt;[4]&lt;/span&gt;&lt;span class=&#34;refbody&#34;&gt;it p&#39;d all over my code!&lt;/span&gt;&lt;/span&gt;
. Apparently this is an &lt;a href=&#34;https://discuss.gohugo.io/t/shortcodes-and-p-tags/2164&#34;&gt;ongoing&lt;/a&gt; and hard to eradicate &lt;a href=&#34;https://github.com/spf13/hugo/issues?utf8=✓&amp;amp;q=shortcode%20%3Cp%3E&#34;&gt;set of issues&lt;/a&gt;, but also I&amp;rsquo;m new to hugo, go, and shortcodes so &lt;del&gt;it&amp;rsquo;s certainly possible&lt;/del&gt; it&amp;rsquo;s definitely the case I&amp;rsquo;ve misunderstood something.&lt;/p&gt;

&lt;p&gt;The shortcode is pretty simple and I&amp;rsquo;ve tried a few variations and not been able to avoid the extra &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tags in any variant where I tried to accomplish both variations in one shortcode.  For example,&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;span class=&amp;quot;ref&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;refnum&amp;quot;&amp;gt;{{.Get 0}}&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;refbody&amp;quot;&amp;gt;{{ if len .Params | eq 2 }}{{.Get 1|safeHTML}}{{end}}{{ with .Inner}}{{ .|safeHTML}}{{end}}&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;causes the issue.  It seems that having &lt;code&gt;.Inner&lt;/code&gt; is part of the trigger for the issue.  I thought maybe I couldn&amp;rsquo;t test the existence of &lt;code&gt;.Inner&lt;/code&gt; like that, so I tried this variant:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;span class=&amp;quot;ref&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;refnum&amp;quot;&amp;gt;{{.Get 0}}&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;refbody&amp;quot;&amp;gt;{{ if len .Params | eq 2 }}{{.Get 1|safeHTML}}{{end}}{{ if len .Inner}}{{ .Inner|safeHTML}}{{end}}&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;But the actual issue turned out to be that the existence of &lt;code&gt;.Inner&lt;/code&gt; in the shortcode itself (whether or not it has a value) is a flag of sorts to hugo which makes it consider  the shortcode to be the paired type, as per &lt;a href=&#34;https://discuss.gohugo.io/t/conditional-inner-logic-for-shortcodes/131&#34;&gt;discussion here&lt;/a&gt;.  Apparently if you don&amp;rsquo;t then use closing tags, &lt;em&gt;bad things happen&lt;/em&gt; ranging from the extra &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; codes to chunks of your text getting pulled into the shortcode.  Once I knew that, I thought everything would be ok because I&amp;rsquo;d read
&lt;blockquote&gt;
A shortcode with &lt;code&gt;.Inner&lt;/code&gt; content can be used without the inline content, and without the closing shortcode, by using the self-closing syntax:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;{{&amp;lt; innershortcode /&amp;gt;}}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;/blockquote&gt;&lt;/p&gt;

&lt;p&gt;That quote uses the &amp;ldquo;shortcode without markdown syntax&amp;rdquo; rather than the &amp;ldquo;with markdown syntax&amp;rdquo;, but I figured it was the same for both.  Either I was wrong about it working for the with markdown version, or something is wrong altogether, because when I do&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;{{% refpo &amp;quot;test1&amp;quot; &amp;quot;Some stuff&amp;quot; /%}}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I get a hugo error from the &lt;em&gt;next&lt;/em&gt; shortcode about not having a closing shortcode&lt;span class=&#34;ref&#34;&gt;&lt;span class=&#34;refnum&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;refbody&#34;&gt;and actually, I get an error for the no markdown versions too, so clearly I&#39;m assuming &lt;i&gt;something&lt;/i&gt; that isn&#39;t true&lt;/span&gt;&lt;/span&gt;
.  But if I do:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;    {{% refpo &amp;quot;test1&amp;quot; &amp;quot;Some stuff&amp;quot; %}}{{% /refpo %}}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Things work fine.&lt;/p&gt;

&lt;p&gt;So, based on that, kinda makes the shortcode not so short for the simple case.  So I broke down and made two different shortcodes&lt;span class=&#34;ref&#34;&gt;&lt;span class=&#34;refnum&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;refbody&#34;&gt;and changed the name while I was at it.  Better? Meh, /shrug&lt;/span&gt;&lt;/span&gt;
, &lt;code&gt;poref&lt;/code&gt; for the simple, non-paired case, and &lt;code&gt;porefx&lt;/code&gt; for the extended, paired version that can handle markdown, etc.&lt;/p&gt;

&lt;p&gt;poref:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;span class=&amp;quot;ref&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;refnum&amp;quot;&amp;gt;{{.Get 0}}&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;refbody&amp;quot;&amp;gt;{{ if len .Params | eq 2 }}{{.Get 1|safeHTML}}{{end}}&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;porefx:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;span class=&amp;quot;ref&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;refnum&amp;quot;&amp;gt;{{.Get 0}}&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;refbody&amp;quot;&amp;gt;{{ .Inner|safeHTML}}&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I&amp;rsquo;d considered using a scratch variable and making the refnum arg optional, with it counting up on its own if not provided, but I kind of like having arbitrary reference indicators, whether it&amp;rsquo;s 1, [1], *, or whatever. So I think I&amp;rsquo;ll call them done for now and move on.&lt;/p&gt;

&lt;p&gt;I mean, it&amp;rsquo;s not groundbreaking or anything, but I think it&amp;rsquo;ll be handy.  I&amp;rsquo;d prefer a shorter syntax more akin to markdown footnotes, but it&amp;rsquo;s not awful.&lt;/p&gt;

&lt;p&gt;Now to work on the style a bit and figure out if I should use a different main font for the whole site - seeing too many jaggies for my taste here. I didn&amp;rsquo;t really notice it on the original HTML5 UP theme, so need to investigate.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Disclaimer</title>
      <link>https://rob.loci.net/post/New-blog-disclaimer/</link>
      <pubDate>Fri, 22 Jul 2016 00:00:00 +0000</pubDate>
      <author>rob@Loci.net (Rob Arnold)</author>
      <guid>https://rob.loci.net/post/New-blog-disclaimer/</guid>
      <description>&lt;p&gt;Oh, hey.  Didn&amp;rsquo;t expect anyone.
&lt;br /&gt;
Oh yeah, first post and all.&lt;/p&gt;

&lt;p&gt;So look, I&amp;rsquo;m jotting down things sometimes, as I think of them.  I&amp;rsquo;m just a guy, not an expert about, well, pretty much anything.  I mean, I&amp;rsquo;ve read a lot, but many have read more.  I tend to soak up a lot of knowledge - but I&amp;rsquo;m sure some of it is wrong, even if I correctly understood it.  Bottom line, this is just me talking.  Take it with a lump of salt.  But maybe it&amp;rsquo;ll make you think too, or you&amp;rsquo;ll find something useful.&lt;/p&gt;

&lt;p&gt;That&amp;rsquo;d be cool.&lt;/p&gt;

&lt;p&gt;What&amp;rsquo;ll I be talking about?  Well, I don&amp;rsquo;t know. Since it&amp;rsquo;s fresh on my mind, I&amp;rsquo;m sure early on there will be a lot about the details of the site itself and my experiences with Hugo (and whatever else I try), hosting, etc.  But past that, mostly just random thoughts and experiences.  See /about/ for more.&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>