Turns out a Hugo shortcode that injects `
` is more useful than simply including it directly.
It turns out that if you want your theme to be able to truncate a long a$$ post without a title, and you figure your theme could check for that special truncation comment <!--more-->
when it checks for a title to see whether a summary of the post should go into the post list rather than full f$&king monty … kinda like:
{{- if (or .Title (findRE `<!--more-->` .Content)) -}}
well … you’d figure f$&kin’ wrong … as no HTML comments will make there way through to the template inside the .Content
page variable.
If, however, you create a basic f$&king shortcode that is all like:
{{ printf "<!--more-->" | safeHTML }}
and instead of sticking <!--more-->
in your long a$$ post where you want it to be truncated for its summary you’re all like . Well, in that case the HTML comments survives to make its way into the
.Content
page variable … and it also happens to be in place to mark the spot of truncation. F$&k you Hugo, I will make you do what I want.