Hello.
Is there any way for a template to drill down deeper into a page’s content, beyond just using {{ .Content }}? Ideally, I’d like to be able to loop over the individual headings defined in the Markdown content, as well as the paragraphs under those headings. I don’t see any way to do this though.
My use case is for generating a Lunr search index.json file. All the examples I’ve seen pack the entire page’s various headings and paragraphs into one single text block. This doesn’t work well for me. I want the json file to have separate entries for each heading, with a text block containing all paragraphs directly under that heading.
Is there any way to do this, or do I need to write an external program to parse the content files?