mivinci / hugo-theme-minima

A clean and minimal Hugo theme.
https://mivinci.github.io/hugo-theme-minima
MIT License
135 stars 37 forks source link

multi-lines in markdown table cells #18

Closed huanggze closed 2 years ago

huanggze commented 2 years ago

Hi, how can we break lines in markdown table cells. I would expect something like below, but it seems not working in minima. Thanks for the help.

column
Hello,
world!
Hello, world!
|column|
|---|
|Hello,<br>world!|
|Hello, world!|
mivinci commented 2 years ago

@huanggze Hi, me again :)

Hugo's default markdown renderer (Goldmark) doesn't allow raw HTML written in markdown, but you can turn it off by adding something to your config file.

If you're using config.toml, it's

[markup.goldmark.renderer]
unsafe = true

If you're using config.yml, it's

markup:
  goldmark:
    renderer:
      unsafe: true

Then you can use <br> to break lines anywhere in a post.

huanggze commented 2 years ago

Thanks for the information and help!