rstudio / blogdown

Create Blogs and Websites with R Markdown
https://pkgs.rstudio.com/blogdown/
1.73k stars 335 forks source link

<sub> and <sup> not working? #460

Closed DominiqueMakowski closed 4 years ago

DominiqueMakowski commented 4 years ago

Hi,

I use the academic theme and have Hugo ‘0.70.0’ and blogdown_0.18. Previously, using \to get small text\ worked. However, after updating, it seems that it doesn't modify the text anymore. I also tried using direct HTML <p><small>small text</small></p>, but similarly, it doesn't seem to affect the text 😕

Is this an expected behaviour?

I wonder if it has to do with this message that pops out during building:

Building sites … WARN 2020/05/16 17:05:02 Markup type mmark is deprecated and will be removed in a future release. See https://gohugo.io//content-management/formats/#list-of-content-formats 🤔

Thanks a lot!


By filing an issue to this repo, I promise that

yihui commented 4 years ago

All the trouble came from https://github.com/gohugoio/hugo/issues/6581. As I said in #447, I really dislike it. Anyway, the solution is to ask goldmark to allow HTML content (i.e. enable the unsafe option): https://gohugo.io/getting-started/configuration-markup/#goldmark

DominiqueMakowski commented 4 years ago

Thanks, that solves it! Just to specify for potential future users, I added this section to my config.toml:

[markup]
  [markup.goldmark]
    [markup.goldmark.extensions]
      definitionList = true
      footnote = true
      linkify = true
      strikethrough = true
      table = true
      taskList = true
      typographer = true
    [markup.goldmark.parser]
      attribute = true
      autoHeadingID = true
      autoHeadingIDType = "github"
    [markup.goldmark.renderer]
      hardWraps = false
      unsafe = true
      xhtml = false