Highlighting Doesn't Work

Markdown for highlight doesn’t work.
Example: ==very important words==

Nor does < mark >< /mark > for html.

I am using the PaperMod template. The example template works just fine with the < /mark> code.

Why?

You need to add this to your site config:

[markup.goldmark.renderer]
  unsafe = true

P.S.: Don’t be scared with “unsafe”. Embedded HTML is supported by CommonMark. Hugo by default removes all HTML embedded in Markdown.

2 Likes

Thank you for the quick response! I’m using .yaml so figured it out. Been killing my brain for days now lol.

For future reference I put it in the config.yaml file:

markup:
  goldmark:
    renderer:
      unsafe: true

Wrap them in a code block like so:

```yaml
foo:
  bar: zoo
```

TOML is wonderful; no fiddling with indentations :stuck_out_tongue_winking_eye:

Lol yea the template required yaml otherwise I would have learned and played with toml. Thanks again!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.