epiverse-trace / research-compendium

https://epiverse-trace.github.io/research-compendium/
Other
1 stars 0 forks source link

fix the Cite link in URL footer #18

Open avallecam opened 9 months ago

avallecam commented 9 months ago

The default Cite link in the footer currently links to a 404 path: https://github.com/epiverse-trace/research-compendium/blob/main/CITATION

We have a CITATION.cff on the root, but the .cff extension is not recognized by the template Cite link.

The Cite link is generated by {varnish} in the footer: https://github.com/carpentries/varnish/blob/c59c9ed79746d6d490486f0ebd3245f9edeb7f3a/inst/pkgdown/templates/footer.html#L21

The git-novice lesson citation relies on the other citation files identifiable by GitHub:

Before the identification of this issue, we created CITATION files with these steps (we recommend steps 1-3 in the training material of this repo):

  1. Fill contributors' data in DESCRIPTION file.

  2. Create from the DESCRIPTION file a CITATION.cff with:

cffr::cff_write(dependencies = FALSE)

  1. Create from the CITATION.cff file a inst/CITATION file with:

cffr::write_citation(x = "CITATION.cff", file = "./inst/CITATION")

  1. Use the ./inst/CITATION for a human-readable output it in the README:

https://github.com/epiverse-trace/research-compendium/blob/8ae2bf08978bcde36eadfdd528f99f210981c9cc/README.Rmd#L48-L51

This is problematic for the template for two reasons:

https://github.com/epiverse-trace/research-compendium/blob/8ae2bf08978bcde36eadfdd528f99f210981c9cc/inst/CITATION#L1-L4

To adapt this for the template,

  1. Create manually a CITATION file in the root with the output of:

readCitationFile(file = "inst/CITATION")

This will be as readable as in the README

https://github.com/epiverse-trace/research-compendium/blob/8ae2bf08978bcde36eadfdd528f99f210981c9cc/README.md?plain=1#L46-L49

Include a Please cite as: on top according to reference: https://github.com/swcarpentry/git-novice/blob/main/CITATION

  1. Add to gitignore the inst/CITATION file to avoid redundancy in the online repo. This is a useful transition file to knit the README.

The output of these steps are:

avallecam commented 9 months ago

Read the citation section suggestions from this lesson https://carpentries.github.io/lesson-development-training/aio.html#readme

avallecam commented 9 months ago

We can also evaluate this arrangement:

Bisaloo commented 3 months ago

Update on this: the workbench now supports CFF out of the box.