petridish icon indicating copy to clipboard operation
petridish copied to clipboard

Document options for bibliographies

Open nickynicolson opened this issue 2 years ago • 3 comments

On a research team site managed with petri-dish, I'd like to include a list of publications output by the team. Ideally we'd store these in a bibliographic data standard format and produce a styled output for viewing as part of the site construction process.

Possible options include:

  • jekyll-scholar (but this not permitted for use in github pages - documented work around)
  • github action to process a bibtex file with pandoc to get a formatted output (as above will require build process change)
  • others?

nickynicolson avatar Jan 17 '23 11:01 nickynicolson

Yeah, that is a good suggestion!

  1. Great that there's already a jekyll-scholar plugin! That should work for people who don't mind running their site locally or using the workaround. I won't not include it in Petridish as I want to keep supporting the simple (default) GitHub Pages setup for users (and thus limit the plugins Petridish uses to those supported by GitHub Pages).
  2. The alternative is indeed a preprocessing of the bibtex or ris file to yml, csv or json. Once it is in the latter formats, Jekyll can read it in a layout (which could be added to Petridish). Not sure what language the preprocessing script should be in. And how to easily offer it as a GitHub Action. Care to experiment with this?

peterdesmet avatar Jan 20 '23 12:01 peterdesmet

Didn't realize the pandoc conversion could be a single line:

pandoc foo.bib -t csljson -o foo.json
# or
pandoc-citeproc --bib2json foo.bib > foo.json

The GitHub actions would then need to be activate on changes to e.g. _data/publications.bib, trigger a conversion and write to _data/publications.json. The latter would be a commit that triggers a site build, where the json file is used in a publications.html layout.

I'm a novice at GitHub actions though, so not sure how to set this up. :-)

peterdesmet avatar Jan 20 '23 12:01 peterdesmet

I've done a bit with actions for merope so I can have a go when I get a moment :)

nickynicolson avatar Jan 23 '23 14:01 nickynicolson