title: How to create an image preview for a post in hugo-academic from .Rmd?
body: <p>I'm trying to add an image preview to a post using hugo-academic and compiling from .Rmd with blogdown, and I can't figure out what to do in the YAML preamble.</p>
  
  <p>Some related posts that have not provided a solution include:</p>
  
  <p>-<a href="https://stackoverflow.com/questions/46524561/include-image-preview-in-blogdown-rmd-yaml-header">Include image preview in blogdown (.Rmd yaml header)</a></p>
  
  <p>-<a href="https://stackoverflow.com/questions/46164301/how-to-add-feature-or-thumbnail-image-for-post-in-rmd-file?rq=1">How to add feature or thumbnail image for post in .Rmd file</a></p>
  
  <p>Hugo-academic wants this in a TOML preamble:</p>
  
  <pre><code>---
  [header]
  image="path"
  ---
  </code></pre>
  
  <p>According to the <a href="https://bookdown.org/yihui/blogdown/configuration.html#toml-syntax" rel="nofollow noreferrer">blogdown book</a>, this is a table in TOML. But square brackets appear to be flow control operators in YAML, and escaping them with backslashes stops the complaints about compiling but does not result in the desired behavior; <code>image: "path"</code> is apparently ignored as any string can be substituted for "path" without change in behavior. At least bookdown is putting the image in the right place in public/img/headers.</p>
  
  <p>So what am I missing? How do I get an image preview for a post in hugo-academic when starting from .Rmd? </p>