Hi,
I am using a headless page bundle to store markdown snippets that are reused in our documentation.
The problem I have now is that we have several procedures (numbered lists) and some of them have common steps, so I’d like to single-source these steps into a headless snippet and only include them where needed.
For example:
contents of headless/common-steps.md
1. Do this
1. Then that
contents of non-headless/procedure1.md
{{< include-headless "common-steps.md" >}}
1. Step specific for this procedure
1. Another step
When rendering the site, the intended output of non-headless/procedure1 would be
1. Do this
2. Then that
3. Step specific for this procedure
4. Another step
However, the numbering restarts for the two lists, like:
1. Do this
2. Then that
1. Step specific for this procedure
2. Another step
Is there a way to avoid this, and number the steps continuously in such scenarios?
Tested with Hugo 0.62.2, goldmark.
For reference, the include-headless shortcode I use is the following:
{{ $path := .Site.GetPage "/headless/index.md" }}
{{ $reusablePages := $path.Resources.Match $file }}
{{ range $reusablePages }}
{{- .Content -}}
{{ end }}```
Any help is greatly appreciated.
Thanks,
Robert