Skip to content

Only keep the first url in citation - #2041

Merged
yihui merged 2 commits into
masterfrom
citation-pkgdown
Feb 19, 2021
Merged

yihui merged 2 commits into
masterfrom
citation-pkgdown

Conversation

@cderv

@cderv cderv commented Feb 9, 2021 •

Copy link
Copy Markdown
Collaborator

This should allow #1843 while keeping only one url in citation.

With this PR, in a clean session we correctly get only one url

> meta = packageDescription("rmarkdown")
> meta$URL
[1] "https://github.com/rstudio/rmarkdown, https://rmarkdown.rstudio.com/docs/"
> toBibtex(readCitationFile("inst/CITATION", meta))
@Manual{,
  title = {rmarkdown: Dynamic Documents for R},
  year = {2021},
  note = {R package version 2.6.6},
  url = {https://github.com/rstudio/rmarkdown},
}

@Book{,
  title = {R Markdown: The Definitive Guide},
  author = {Yihui Xie and J.J. Allaire and Garrett Grolemund},
  publisher = {Chapman and Hall/CRC},
  address = {Boca Raton, Florida},
  year = {2018},
  note = {ISBN 9781138359338},
  url = {https://bookdown.org/yihui/rmarkdown},
}

@Book{,
  title = {R Markdown Cookbook},
  author = {Yihui Xie and Christophe Dervieux and Emily Riederer},
  publisher = {Chapman and Hall/CRC},
  address = {Boca Raton, Florida},
  year = {2020},
  note = {ISBN 9780367563837},
  url = {https://bookdown.org/yihui/rmarkdown-cookbook},
}

We could adjust the order in DESCRIPTION and select the second. Or use the CRAN url in CITATION as it is the default for other package : https://CRAN.R-project.org/package=rmarkdown

@yihui is it interesting to make this change ?

@yihui yihui left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Comment thread inst/CITATION Resolved
@yihui
yihui merged commit ab7dc8e into master Feb 19, 2021
@yihui
yihui deleted the citation-pkgdown branch February 19, 2021 02:34
j-magnolia added a commit to j-magnolia/rmarkdown that referenced this pull request Mar 3, 2021
Merge remote-tracking branch 'rstudio_origin/master' into jg-devel

* rstudio_origin/master: (26 commits)
  Use data-external=1 to prevent encoding by Pandoc of img src
  add `subdirs` documentation for site generator (rstudio#2058)
  fix: corrected typo in `ghostscript` (rstudio#2059)
  Add CoC contact email
  quillt has moved to rstudio/quillt
  fix invalid HTML code in shiny_prerendered documents (rstudio#1942)
  Allow pkgdown PR preview (rstudio#2055)
  Adding pkgdown site built by GHA (rstudio#1955)
  Add shiny bslib dependency inside html_document_base pre-process (rstudio#2049)
  start the next version
  CRAN release v2.7
  place <div> in \code{}
  amend 62ae2ed and rstudio#1989: make sure output_format_filter is a function; testing NULL is not enough, e.g., the radix package still calls
  use CRAN releases of shiny and bslib
  tweak news
  Only keep the first url in citation  (rstudio#2041)
  Fix for knit_print.data.frame (rstudio#2050)
  set gfm_auto_identifiers to input format if toc is TRUE (rstudio#2040)
  Enable pkgdown/downlit cross-package links to rmarkdown (rstudio#1843)
  update CONTRIBUTING.md
  ...

# Conflicts:
#	DESCRIPTION
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants