If a snippet is used in only one page,
you can turn the page into a
Hugo bundle
and
put the snippet inside the bundle directory.
This is what I did with the markup.asciidocExt
snippet that is
used in
sections 2 and 3
above.
The
source files of
this
page, which is a
leaf bundle,
are structured like this:
2020-12-21-intertwingling-asciidoc-hugo/
├── index.adoc
└── markupdotasciidocext.yaml
In index.adoc
, the source of
section 2 includes this fragment…
{{< highlight yaml "hl_lines=4 8" >}}
{{< get-leaf-text markupdotasciidocext.yaml >}}
{{< /highlight >}}
…and the source of
section 3
includes this fragment:
----
{{</* highlight yaml "hl_lines=4 8" */>}}
{{< get-leaf-text markupdotasciidocext.yaml >}}
{{</* /highlight */>}}
----