Closed bwelman closed 3 years ago
Thanks. description
metadata is not currently in the bs4_book
html template. That is why it is not used. There is already a PR to add it (among others): https://github.com/rstudio/bookdown/pull/1034
Adding onto this, I was adding some bookdown books to my Zotero library using the Zotero Connector browser plugin and noticed that bs4_book
s are not recognized as books by Zotero Connector (they're seen as a webpage). Whereas bookdown books using the default theme are recognized as books. I'm assuming this is due to differences in metadata between the two.
For example, compare Hands-On Programming with R which uses the default bookdown
theme (recognized as a book, see left icon from the Zotero Connector plugin):
To R4DS which uses bs4_book
(recognized as a webpage):
It would be nice if the behaviour was consistent here between bookdown's different themes (assuming this is a bookdown issue and not a Zotero Connector issue).
@mccarthy-m-g that is interesting. Can you share more documentation about the zotero connector and what are the expected metadata ? thanks.
We'll definitely look into that soon.
@cderv Here is some developer documentation for Zotero Connector. It looks like the plugin uses Zotero Translators to identify whether something is a book, journal, webpage, etc. In this case I'd guess either an "Individual Site Translator" or "Metadata Import" is being used for classification.
I did a quick command-F
search through the current list of translators for "gitbook" and "bookdown" but there were no hits. So maybe it is using metadata for classification.
Pinging the main contributor for Zotero Connector, @adomasven, as they might be able to identify the cause of the discrepancy above better than me.
I think this is related to:
The Zotero Connector may rely on the meta tags to identify books. See: https://www.w3schools.com/tags/tag_meta.asp; https://ogp.me/#types
We are working on adding metadata for bs4_book
but I am still unsure which one are required for zotero connector. We'll add the main one and we'll see after merging is this is working for you or something is still missing.
I missed the ping from earlier. See exposing metadata for a dev guide on how to provide data that Zotero will understand.
Oh thank you ! 👍
Thanks for working on this! If you ping me after merging I'll check that the zotero metadata is working.
We've now merged the change. Using dev version and setting the correct variable in index.Rmd
yaml should result in correct meta tag.
Quick tests show that the zotero connector recognize it as bookdown. However, the content seen will depend of the book.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.
Only "title" and "author" are present as metadata in the published files. I'm missing "description".
By filing an issue to this repo, I promise that
xfun::session_info('bookdown')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('rstudio/bookdown')
.I understand that my issue may be closed if I don't fulfill my promises.