(Some pre-amble: I spend some while discussing this/trying things with Michael).
I believe the YAML works OK if exported as a separate document and used externally as a
pandoc input parameter source.
What isn’t clear is where in this highly complex export things are going wrong. From what I’ve seen, I don’t think it is Tinderbox standard export but rather in the complex-plex-preview-without-export process.
I think it important to point out that—current Markdown support notwithstanding—‘Preview’ mode was introduced to allow the use to check HTML [sic] outpour without exporting. Markdown,
pandoc, etc., come later in the piece.
To let the community help, I’d request @satikusala provide a ‘minimum viable example’ TBX doc (i.e. as little content as needed to prove all necessary elements) and then we will have a common frame of reference as this is definitely not a simple problem to resolve. It is also unclear that it is even a Tinderbox export problem at this stage, as opposed to optimistic expectations for what preview mode can handle. We need to consider the ROI of additional export complexity here, given that many users don’t use export.
Personally, I sue export and I think the idea proposed is neat, but I’m mindful of the wants/needs of the wider community of Tinderbox users. It may well be that it simply a case of exporting and ‘previewing’ externally, as we did up until v6.