Zenodo

Before storing our repository in Zenodo, we will add some metadata to it, so our material is easily identifiable in Zenodo. We do this by adding a file called .zenodo.json to our repository, a json file specifying the different metadata attributes for zenodo. Here’s an example of such a file:

{
  "title": "Analysis of babynames",
  "upload_type": "publication",
  "publication_type": "report",
  "keywords": [
    "R",
    "quarto",
    "tutorial"
  ],
  "creators": [
    {
      "name": "Geert van Geest",
      "affiliation": "SIB Swiss Institute of Bioinformatics",
      "orcid": "0000-0002-1561-078X"
    } 
  ]
}
Exercise

Add a .zenodo.json file to your repository, and change it accordingly (e.g. at least change the creator name and ORCiD). Consider adding attributes specified here. After that, add it to the repository, commit the change and push it to the remote.

Modify the .zenodo.json file and add it to the repo. Stage, commit and push like so:

git add .zenodo.json
git commit -m "adds .zenodo.json file"
git push

Now that we have added metadata to the repository, we can link our repository to Zenodo:

Exercise

Off course we want to show off with the DOI we just assigned. In order to do that:

  • Click the DOI badge. A window will appear with code chunks that you can use to display the badge.

  • Copy-paste the markdown syntax to your main page (index.qmd) to show it on your website.

  • Stage, commit and push the change. After that, render and publish the website.

An example of the top of index.qmd:

---
title: "quarto-tutorial"
---

[![DOI](https://zenodo.org/badge/657627364.svg)](https://zenodo.org/badge/latestdoi/657627364)

After that, we run the commands:

git add index.qmd
git commit -m "Adds a badge to the website"
git push

And the quarto commands (not required if you’ve set up the action!):

quarto render
quarto publish gh-pages