halogenica / beautifulhugo

Theme for the Hugo static website generator
Other
1.15k stars 603 forks source link

Raw html in the content files #348

Closed astonbitecode closed 2 years ago

astonbitecode commented 4 years ago

Hi.

As far as I understand, after Hugo version 0.62 we cannot add raw html in the markdown files.

Would you like to add a shortcode that allows this?

Something like:

{{< rawhtml >}}
  <p class="speshal-fancy-custom">
    This is <strong>raw HTML</strong>, inside Markdown.
  </p>
{{< /rawhtml >}}

The idea is based on this blog.

RoneoOrg commented 2 years ago

Hi @astonbitecode,

Hugo allows to use HTML in content files, even with a version superior to 0.60, with the following settings in config.toml:

    [markup.goldmark.renderer]
      unsafe = true

Ref:

Should we still consider this PR or does this setting answer your needs?

astonbitecode commented 2 years ago

This seems enough.

Thanks!