Closed nikclayton closed 2 months ago
This seems related to https://github.com/gohugoio/hugo/issues/7416
The {{<optional>}}
Hugo shortcode appears in three files (per code search: DomainBlock
, Instance
, and ScheduledStatus
).
AFAICS, the difference is that for DomainBlock
, the shortcode is part of a ###
-level heading and is included in the Table of Contents at the top of the page, whereas it is on level ####
or #####
or not even part of a heading in the other files (and thus not pulled into the ToC).
According to the linked Hugo issue, the problematic instance should be modified to {{%optional%}}
.
I can provide a PR, but I don't have the toolchain at hand so I cannot test the change.
Here you go.
Let me emphasize once more: I have not tested that patch!
I have tested the patch in the meantime, and it works. See PR for details.
(Afterthought: the build process for the docs website should probably grep the Hugo-built files for HAHAHUGOSHORTCODE
and complain.)
For reference, the Hugo docs explain the different shortcodes.
My summary: {{<
shortcodes are not rendered before being sent to the content renderer (causing the HAHAHUGOSHORTCODE
issue) whereas {{%
shortcode are – for the latter type, which the above PR puts into use, "[t]his means that the rendered output from a shortcode can be part of the page’s table of contents [...]"
https://docs.joinmastodon.org/entities/DomainBlock (and possibly other pages) is displaying HAHAHUGOSHORTCODE-s0-HBHB.
Apparently this is an issue with Hugo shortcodes, but I'm not familiar enough with Hugo to debug further.