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

update citation select to 2.x to remove bibcite dependency #140

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

Natkeeran
Copy link
Contributor

Update citation_select to 2.0.0-beta1 release.

  • Removes bibcite dependency (brings in the necessary style sheets and config to this module)
  • Uses seboettg/citeproc-php to generate the citations
  • Additional logic to handle more cases of EDTF dates, including ranges
  • Picks the first publisher when there are more than one

How to test it:

  • Get the PR
  • Create some sample content
  • Verify that citations are as expected
  • Verify bibcite module is no longer installed

@rosiel
Copy link
Contributor

rosiel commented Apr 1, 2024

This is awesome, Nat. I'll test. Will you be able to provide instructions for existing sites? It looks like your citation styles are being configured with a few extra fields, do we need those?

@rosiel
Copy link
Contributor

rosiel commented Apr 1, 2024

I'm ready to merge, just want to touch base on this first. My instructions for existing sites, so far, are:

  • Edit composer.json to require this module version ^2.0@beta
  • Run composer update
  • (Export your CSL style configs?)
  • run drush pm-uninstall bibcite
  • run composer remove drupal/bibcite (and rejoice as the deprecation warnings go away)
  • Import your stylesheets again, either by re-importing what you exported (maybe that will work???), importing the configs now in the starter site through Configuration Synchronization (this worked for me) or by going to Configuration > Citation Select Settings > CSL Styles > Add Style (paste the XML from here into the field) (this also worked for me). (I'm not sure what the file should look like for the "Install style from file" option?)
  • Under Configuration > Citation Select Settings > Config, select your default style
  • Your field mappings were saved, no worries there...
  • Profit!

@Natkeeran
Copy link
Contributor Author

Natkeeran commented Apr 2, 2024

@rosiel
I followed your steps, and that did work.
To import the styles, you can go to /admin/config/citation-select/csl_style and add styles from here: https://github.com/citation-style-language/styles/ (e.g copy past the style xml). Or you can do drush config:import --partial --source=/var/www/drupal/web/modules/contrib/citation_select/config/install. However, the later will overwrite your field mapping setting with default. So, you may want to export the current one, then import it back again!

--
Not sure question about the extra fields for csl styles. They are similar to bibcite configurations.

@rosiel rosiel merged commit d767868 into main Apr 3, 2024
4 checks passed
@rosiel rosiel deleted the update_citation_select branch April 3, 2024 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants