Skip to content

Commit 38d4939

Browse files
authored
Allow inline html in _index.Rmarkdown (#42)
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.
1 parent 982dfb3 commit 38d4939

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

exampleSite/config.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,8 @@ footnotereturnlinkcontents = "↩"
3434
[params]
3535
description = "A website built through Hugo and blogdown."
3636
footer = "&copy; [Yihui Xie](https://yihui.name) 2017 -- 2019 | [Github](https://github.com/yihui) | [Twitter](https://twitter.com/xieyihui)"
37+
38+
[markup]
39+
[markup.goldmark]
40+
[markup.goldmark.renderer]
41+
unsafe = true

0 commit comments

Comments
 (0)