Using shortcodes with .RawContent


#1

I use .RawContent for RemarkJS slides. I also use custom shortcodes for things like embedding and math notation. Is there a way to use both together? For example, if I want to use {{< math >}}\frac{a}{b}{{< /math >}} in my markdown in the content of a file, and then emit that with {{ .RawContent }} in the Hugo template, can I get Hugo to parse and execute the shortcode in the markdown before outputting it?


#2

I think this GitHub issue would help here, if I understand your post correctly:

Allow shortcode content to be processed by Blackfriday etc.

That issue is currently scheduled for the next Hugo release, so it might be implemented soon.

I don’t know of another way to achieve your goal, sorry.