Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix the Cite link in URL footer #18

Open
avallecam opened this issue Nov 15, 2023 · 3 comments · May be fixed by #19
Open

fix the Cite link in URL footer #18

avallecam opened this issue Nov 15, 2023 · 3 comments · May be fixed by #19

Comments

@avallecam
Copy link
Member

avallecam commented Nov 15, 2023

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 CITATION file,
  • has the "Cite this repository" label on GitHub, without a visible .cff file,
  • 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):

  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:

```{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:

bibentry(bibtype = "Misc",
key = "epiresearchcompendium",
year = 2023,

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

#>
#> 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

  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 avallecam changed the title fix the Cite link in footer fix the Cite link in URL footer Nov 15, 2023
avallecam added a commit that referenced this issue Nov 15, 2023
this complements the cff file and the inst/citation file
@avallecam avallecam linked a pull request Nov 15, 2023 that will close this issue
@avallecam
Copy link
Member Author

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

@avallecam
Copy link
Member Author

avallecam commented Nov 15, 2023

We can also evaluate this arrangement:

  • Only one in the root folder: keep the CITATION file only.
    • This is human-readable and
    • generates a "Cite this repository" link in the About section.
  • in the inst/ folder, keep the CITATION file in bibtex format
  • in README,
    • keep the readCitationFile output, and
    • refer to both files for citation formats: CITATION for APA, inst/CITATION for bibtex.
  • gitignore the .cff and use it to generate the citation from the DESCRIPTION file.

@Bisaloo
Copy link
Member

Bisaloo commented May 22, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

2 participants