Closed nancym closed 7 years ago
No, not to my knowledge. However, if you are okay with Blackfriday's Markdown, you will be able to render R Markdown to Markdown instead of HTML after I implement #165. Then emoji will work.
.Rmarkdown
files at https://bookdown.org/yihui/blogdown/output-format.htmlJust for clarification, does this mean that emojis can't be rendered in either .Rmd or .Rmarkdown files if the output is like this?
output:
blogdown::html_page:
toc:true
And the workaround is to render the output like this
output:
md_document:
toc:true
Or to write in a .md document instead of .Rmd or .Rmarkdown?
@ProQuestionAsker The life cycles of .Rmd vs .Rmarkdown:
Emoji is a Markdown extension only in Blackfriday. Pandoc does not support it. As a result, you must use .Rmarkdown if you must have emojis.
For TOC in .Rmarkdown, you have to use the Hugo variable .TableOfContents
: https://bookdown.org/yihui/blogdown/templates.html#how-to
This won't work in blogdown:
output:
md_document:
toc:true
blogdown only supports the output format blogdown::html_page
. All other output formats are ignored.
Ah, that makes sense. Thank you!!
@yihui: Is there a way to extend the generation pipeline so that I can process the generated HTML and enable emojis? It is such a shame that we cannot use Hugo features with .Rmd
files as I need all the features there plus Hugo :(
@andry-tino I may be missing what you are asking for, but you can put emojis in .Rmd
files via the emo package.
The code would look something like `r emo::ji("grinning")`
, which you can add directly within the plain text of a post.
If I put this in
config.toml
:An emoji like
:smile:
in a markdown file will be rendered as :smile: in the HTML output. Is there anything I can put in_output.yml
to get emoji to work in an Rmarkdown file, e.g. something like this:Thanks!