You can include regular HTML in you Markdown files. So a
<script> tag should work. Maybe it can happen that Go templates escape them for security reasons (unless Hugo trusts the user and marks it as safe by default).
Yes the problem are the quotes. I have got this code e.g.
And the double-quotes within the jQuery call are escaped. How can I avoid the escaping within the markdown file of this block?
… just an idea, … not sure/didn’t try - about that :
</script>` | safeJS }}
note: use backticks not apostrophes
That works for me in Hugo 56.3
Correct me if I’m wrong but if you put in your
unsafe = true
then something like
works in your markdown file without problems.