Open mattmoor opened 4 years ago
@mattmoor, each shortcode gets sent to the markdown processor by default but there are ways to indicate not to process (ie. just copy content). Hugo gets unhappy we you nest shortcodes (one calls the other, etc.).
Sorry i dont have time to dig in but i describe some of this here in the readfile shortcode.
In short {{%...
goes to processor, {{<....
skips it. There is also {{-...
that removes whitespace (example in version shortcode). Another helpful method is Scratch (examples in both shortcodes), which allows you to use a single variable which you can then set a specific value (ie. if this, then that).
@RichieEscarez that's super helpful, I will dig into that some more :)
I think that this is essentially what the tabs are hitting:
IMPORTANT: You cannot nest shortcodes. When the Hugo build runs on a file,
any shortcodes within that file are processed. For example, if you use `readFile`
to include a source file, and that source file contains another shortcode,
none of those "nested shortcodes" are processed. Nesting a shortcode within another
shortcode results in incorrectly rendered content
(ie. `{{% the short code syntax shows in the HTML of the parent file %}}`).
Known Hugo limitation: https://discourse.gohugo.io/t/call-shortcodes-in-markdownified-text/21189
Looks like there might be a path to fixing this but some investigation and testing needs to be done: https://github.com/knative/website/issues/227
So I hit this trying to use https://github.com/knative/website/issues/126 from within a tab...
Basically, unless I flip the switch to allow HTML through from markdown (even though the HTML is coming from a shortcode!) the HTML generated by my feature-state is scrubbed 😢
I suspect that this is a problem with tab, not the new stuff, but I don't speak this stuff well enough to meaningfully debug (it's all trial and error).
cc @RichieEscarez in case he has any quick insights 🙏