TIL: 2020-03-18
No entry for the 17th. It was a bad day.
Stalled by the Dot
On the night of the 17th, I learned that the Hugo theme development issue which had caused me 45 minutes of irritation and stress the night before was caused by leaving out a period in one call of one template.
Yep, one period — “the dot.” Don't let your kids learn to code. It's not worth it.
So, to get into what I actually learned*… when calling a Hugo partial, you need to include a .
(“the dot”) to pass on metadata from the current page.
{{ partial "head.html" . }}
Calling it without “the dot” would work… but only if all you planned to do was use that to include the same HTML/hugo templating without any conditionals, variables, etc. It wrecks hell on most templating, however.
*I totally knew this. However, I am still building my “common troubleshooting issues in Hugo” patterns and had not yet added “check the partial call for ‘the dot’” to my toolkit.
Let a Thousand Typos Bloom
I was also working on a project to get typo lists for our catalog cleanup and found/remembered Ballard's List: http://terryballard.org/typos/typoscomplete.html
We will never go hungry for typos again.