Inserting citations and blogdown

So there are 3 pieces you need to make this work (see: https://blogdown-demo.rbind.io/2017/08/28/adding-citations-to-posts/):

  1. Save a BibTeX file(s) in the /content/post/ directory. The file should be a plain-text file that contains citations that generally look like this:

    @ARTICLE{key,
    required_fields [, optional_fields] }
    
  2. Reference the BibTeX file(s) in the YAML header of your post (and add link-citations: true to YAML if you want the links to show up in text):

    ---
    bibliography: [one.bib, another.bib, yet-another.bib]
    ---
    
  3. In the text of your post, reference items in BibTeX file(s) using @key

So from what you posted, I can see that you have done 2 and 3. What we can't see is that the .bib file r-references.bib is in the same folder as your blog post. Is that true? If it is, can you share a GitHub repo with your code? Other things I can't see: what versions of Hugo and blogdown you are using- are they up to date?

As a troubleshooting strategy, have you tried following the blog post to add cites for R packages using knitr? This way you could rule out whether this is an issue with your .bib file versus blogdown.

1 Like