peterdesmet / petridish

Jekyll theme for research project websites 🧫
https://peterdesmet.github.io/petridish
MIT License
53 stars 44 forks source link

Document options for bibliographies #73

Open nickynicolson opened 1 year ago

nickynicolson commented 1 year ago

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:

peterdesmet commented 1 year ago

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 commented 1 year ago

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. :-)

nickynicolson commented 1 year ago

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