Best way to create an FAQ with schema

There are no plugins for Hugo as currently there is no API.

We do have Custom Output Formats that can be used in various scenarios.

@divinerites above offered a working example for a simple Schema Setup

But for the complex situation you describe, structured data that is written as complex HTML in the middle of a page’s body and then somehow loop through it to generate the Schema, that is not how things work in Hugo.

The .Content variable that holds the body of a content file is a single variable.

There have been workarounds about splitting .Content in this forum.

Like this one or this one

However looping through the split Content sections to populate a faq or other schema?
It can probably be done, haven’t really tried, but it probably won’t be clean or easy to achieve.