-
Notifications
You must be signed in to change notification settings - Fork 1
Description
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:
- only one human-readable
CITATIONfile, - has the "Cite this repository" label on GitHub, without a visible
.cfffile, - But it does not produce the APA and BibTeX outputs in the citation prompts.
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):
-
Fill contributors' data in DESCRIPTION file.
-
Create from the DESCRIPTION file a
CITATION.cffwith:
cffr::cff_write(dependencies = FALSE)
- Create from the
CITATION.cfffile ainst/CITATIONfile with:
cffr::write_citation(x = "CITATION.cff", file = "./inst/CITATION")
- Use the
./inst/CITATIONfor a human-readable output it in the README:
research-compendium/README.Rmd
Lines 48 to 51 in 8ae2bf0
| ```{r,echo=FALSE} | |
| readCitationFile(file = "inst/CITATION") | |
| ``` |
This is problematic for the template for two reasons:
- It is not located in the root folder,
- and if we write it in the root, the output is generated in bibTeX format, which compared to a carpentries reference, is not human-readable:
research-compendium/inst/CITATION
Lines 1 to 4 in 8ae2bf0
| bibentry(bibtype = "Misc", | |
| key = "epiresearchcompendium", | |
| year = 2023, |
To adapt this for the template,
- Create manually a
CITATIONfile in the root with the output of:
readCitationFile(file = "inst/CITATION")
This will be as readable as in the README
Lines 46 to 49 in 8ae2bf0
| #> | |
| #> Valle A, Tamayo C, Azam J (2023). "research-compendium: Improve Your | |
| #> Code For Epidemic Analysis With R." | |
| #> |
Include a Please cite as: on top according to reference: https://github.com/swcarpentry/git-novice/blob/main/CITATION
- Add to gitignore the
inst/CITATIONfile to avoid redundancy in the online repo. This is a useful transition file to knit the README.
The output of these steps are:
CITATION.cfffile: to get the "Cite this repository" label with APA and BibTeX outputs.--> removed in step 6.inst/CITATIONfile: to generate a human-readable file withutils::readCitationFile()to include in README.CITATIONfile: to fill theCitelink for the workbench template. This is visible in the footer of the URL and generated from code.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status