I’m trying to use the block quote render hook from the documentation to add a citation to my quote. It seems like Hugo isn’t using my template at all.
My config file:
baseURL = 'https://example.org/'
languageCode = 'en-us'
title = 'My New Hugo Site'
theme = 'whiteplain'
[markup]
[markup.goldmark]
[markup.goldmark.parser]
[markup.goldmark.parser.attribute]
block = true
From my markdown file:
> The basic framework conceives a 10-meter communications range with line of sight at a transfer rate of 250 kbit/s. Bandwidth tradeoffs are possible to favor more radically embedded devices with even lower power requirements for increased battery operating time, through the definition of not one, but several physical layers. Lower transfer rates of 20 and 40 kbit/s were initially defined, with the 100 kbit/s rate being added in the current revision.
{ cite="https://en.wikipedia.org/wiki/IEEE_802.15.4" caption="From Wikipedia" }
> [!WARNING]+ Radiation hazard
> Do not approach or handle without protective gear.
and then my layout/_markup/render-blockquote.html :
{{ $emojis := dict
"caution" ":exclamation:"
"important" ":information_source:"
"note" ":information_source:"
"tip" ":bulb:"
"warning" ":information_source:"
}}
{{ if eq .Type "alert" }}
<blockquote class="alert alert-{{ .AlertType }}">
<p class="alert-heading">
{{ transform.Emojify (index $emojis .AlertType) }}
{{ with .AlertTitle }}
{{ . }}
{{ else }}
{{ or (i18n .AlertType) (title .AlertType) }}
{{ end }}
</p>
{{ .Text }}
</blockquote>
{{ else }}
<blockquote>
{{ .Text }}
</blockquote>
{{ end }}
which is directly from the docs, for having lil sigils; I also tried this:
<figure>
<blockquote {{ with .Attributes.cite }}cite="{{ . }}"{{ end }}>
{{ .Text }}
</blockquote>
{{ with .Attributes.caption }}
<figcaption class="blockquote-caption">
{{ . | safeHTML }}
</figcaption>
{{ end }}
</figure>
which is also directly from the docs for adding captions. In either case, the rendered content just looks like this:
Clearly the citation is being picked up by something, since it’s ending up in the blockquote HTML block, but nothing else is. Moreover, when I invoke hugo with hugo serve –printUnusedTemplates I get this:
WARN Template _markup/render-blockquote.html is unused, source file /home/iridian/repos/highnoiseratio/layouts/_markup/render-blockquote.html
What gives? why does neither documentation example work? Why isn’t my render hook being picked up and/or used?
