Hugo Shortcodes Library
GitHubToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Raw HTML

A Hugo shortcode to write raw HTML in your Markdown files.

How to use

# file.md

{{< raw_html  >}}
<p id="demo"></p>
<script>
        document.getElementById("demo").innerHTML = Math.random();
</script>
{{< /raw_html  >}}

Shortcode

# raw_html.html

<!-- raw html -->
{{ .Inner }}

Sample

highlighted text


Source