year = sub('.*(2[[:digit:]]{3})-.*', '\\1', meta$Date, perl = TRUE)
vers = paste('R package version', meta$Version)
if (length(year) == 0) year = format(Sys.Date(), '%Y')

bibentry(
  'Manual',
  title = paste('bookdown:', meta$Title),
  author = Filter(function(p) 'aut' %in% p$role, as.person(meta$Author)),
  year = year,
  note = vers,
  url = strsplit(meta$URL, ',')[[1]][1]
)

bibentry(
  'Book',
  title = 'bookdown: Authoring Books and Technical Documents with {R} Markdown',
  author = as.person('Yihui Xie [aut]'),
  publisher = 'Chapman and Hall/CRC',
  address = 'Boca Raton, Florida',
  year = '2016',
  isbn = '978-1138700109',
  url = 'https://bookdown.org/yihui/bookdown'
)
