2

I'm using the (wonderful) academic hugo theme to create a website. It comes with some example posts, and each of these show up in the post list accompanied by a thumbnail image. These posts are all .md files and include the following in their front matter:

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Placement options: 1 = Full column width, 2 = Out-set, 3 = Screen-width
# Focal point options: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight
image:
  placement: 2
  caption: 'Image credit: [**Unsplash**](https://unsplash.com/photos/CpkOjOcXdUY)'
  focal_point: ""
  preview_only: false

I have followed the instructions and have a "featured.png" in my page's folder. My Rmd's yaml header looks like so:

---
title: "my title"
author: "Kyle Ward"
date: 2019-08-28
categories: ["R"]
tags: ["R Markdown", "packages"]
image:
  placement: 2
  caption: ""
  focal_point: ""
  preview_only: false
projects: ["my-project"]
---

The image thumbnail doesn't show up like all the other .md example posts. The other yaml tags work. For instance, my post is associated with "my-project", it has the right author info, etc. What am I doing wrong?

Thanks for your help!

Kyle Ward
  • 889
  • 1
  • 8
  • 18

1 Answers1

0

Normally, you will also need to add the thumbnail option to your .md file header, in your case:

---
title: "my title"
thumbnail: "page_folder/featured.jpg"
... other params ...
---
  • My source files are not .md but .Rmd. For .md, I don't need the thumbnail option. The "image" family of options works. In any case, I tried adding the thumbnail option to my rmarkdown file, but it didn't work. – Kyle Ward Sep 03 '19 at 16:14