Yay! It works!

Image in Hugo-Academic Theme

Refer to Add a Thumbnail and a Header-Image to a Blogpost using the Hugo-Academic Theme and blogdown

If you use the blogdown package to generate blog posts, you will notice that the suggested workflow differs slightly from the workflow proposed on the Hugo-academic website. Using blogdown, it is not obvious how to obtain a thumbnail and a header image (possibly different) for your post. Below, I explain how to achieve this.

Thumbnail Image

Call the image featured.jpg and save it in the directory of the post. Rename the post markdown file index.Rmd. Add the following to the yaml header:

image:
  caption: ''
  focal_point: ''
  preview_only: yes

If you want this image to also be the header image, set preview_only: no.

Header Image

If you want a header image that is different from the thumbnail image:

Save the image (using a name of your choice) in static/img/headers Add the following to the yaml header:

header:
  image: "/headers/bubbles-wide.jpg"
  caption: "Yay! It works!"

In-post Image

Within the body of the blog text, you can use Addin - Insert image in RStudio to insert an image. The resulting code will look something like this:

Zhe Lu
Zhe Lu
Graduate student & Research assistant

A graduate student pursuing the knowledge of data science.