Skip to content

Commit

Permalink
Allow inline html in _index.Rmarkdown (#42)
Browse files Browse the repository at this point in the history
Starting with hugo 0.60, the default markdown renderer changed from
blackdown to goldmark. By default, goldmark does not render raw HTML so
specifying raw html in _index.Rmarkdown (in this instance to customize
an image's display) created an html file with <!-- raw HTML omitted -->
rather than the correct html to display the image.

You can make goldmark include raw html by switching it to `unsafe` mode
in the `config.toml` which this commit does.

As an FYI, An alternative is to mv `_index.Rmarkdown` to `_index.Rmd`
which will switch the markdown engine from goldmark to pandoc which
still renders raw html.
  • Loading branch information
tmward authored Jul 24, 2020
1 parent 982dfb3 commit 38d4939
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,8 @@ footnotereturnlinkcontents = "↩"
[params]
description = "A website built through Hugo and blogdown."
footer = "&copy; [Yihui Xie](https://yihui.name) 2017 -- 2019 | [Github](https://github.com/yihui) | [Twitter](https://twitter.com/xieyihui)"

[markup]
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true

0 comments on commit 38d4939

Please sign in to comment.