some text^[This is an inline footnote.]
Ongoing
According to
the
Repology Hugo badges,
the
latest packaged Hugo
is
.
Hugo’s .RenderString
method
makes it
possible to use more than one of
Hugo’s markup languages
in the source of a single
page.
This means
you can test
features
of
Hugo’s
markup languages
without
creating a separate file for each markup language.
For details, see
Infinite Ink’s
Hugo’s .RenderString
Method.
That article discusses this renderas
shortcode:
{{/*
* CREATED: 2021-July by nm
*
* PATH: layouts/shortcodes/renderas.html
*
* EXAMPLE USAGE:
*
* {{< renderas adoc >}}
* AsciiDoc markup
* {{< /renderas >}}
*
*/}}
{{ $options := (dict
"markup" (.Get 0)
"display" "block"
) }}
{{ .Inner | .Page.RenderString $options }}
This renderas
shortcode is used in the
tests and exercises below.
To learn about Markdown footnotes, see the Footnotes👣 section of Infinite Ink’s Ordinary and Extraordinary Markdown. Some (not all) Markdown flavors support the following syntax for inline footnotes:
some text^[This is an inline footnote.]
In the source of the
first
two
tests
below, I use
Infinite Ink’s renderas
shortcode to test
this syntax in
the
Markdown flavors
that are
supported
by
Hugo
v0.100.0+.
ℹ | Starting with version 0.92.0, Hugo no longer supports Mmark-flavored Markdown. Starting with version 0.100.0, Hugo no longer supports Blackfriday-flavored Markdown. |
Pandoc-flavored Markdown supports this inline footnote syntax, but Goldmark-flavored Markdown does not. It’s possible, but not likely, inline footnotes will be supported in a future version of Goldmark.
To learn about AsciiDoc footnotes, see docs.asciidoctor.org/asciidoc/latest/macros/footnote/.
{{< renderas adoc >}} some textfootnote:[This is an inline footnote.] {{< /renderas >}}
ℹ | Test 3’s renderas argument can be
ad ,
adoc ,
or
asciidocext
(but not asciidoc , which
is
a bug). |
Three of the four markup languages tested above support inline footnotes.👍
Determine which of Hugo’s markup languages support nested footnotes (footnotes within footnotes). In the next two sections, I begin the exercise.
{{< renderas goldmark >}} some text[^1] [^1]: footnote 1[^2] [^2]: footnote 2 {{< /renderas >}}
Your mission, if you choose to accept it,
is to use the renderas
shortcode to
see if
AsciiDoc, Org-mode, Pandoc, etc.
support nested footnotes.
I think most of Hugo’s markup languages support having multiple references to a single footnote. I’m mainly interested in seeing how the footnote itself signals that it is referred to from multiple places.
@nm@mathstodon.xyz
or
#InfiniteInk
in it.