Reputation: 85
I'm currently trying to setup a hugo blog with blogdown and can't find a way to add feature or thumbnail images to posts from within .Rmd
files, which would like this with the tranquilpeak theme:
As far as I understand, it is easy to do in .md files by just adding some syntax like this:
+++
featuredImage = "img/foobar.jpg"
+++
I found this in the minos theme and in a discourse post. But how can I do this inside a .Rmd
file?
Upvotes: 3
Views: 1449
Reputation: 76
One option is to change the .Rmd
filename to index.Rmd
and use the featured.png/jpg
image in the page's folder.
Works fine for me.
Upvotes: 1
Reputation: 30114
It does not matter whether you use .md or .Rmd: if the theme supports the featuredImage
option, you can also use it in .Rmd. The only thing you need to make sure is to write metadata in YAML instead of TOML if the post format is .Rmd (see documentation), i.e.,
---
featuredImage: "img/foobar.jpg"
---
Upvotes: 3