jaspervdj / hakyll

A static website compiler library in Haskell
jaspervdj.be/hakyll
Other
2.71k stars 409 forks source link

`processPandocBiblio` doesn’t support all bibliography formats that Pandoc does #894

Closed benjamineskola closed 3 years ago

benjamineskola commented 3 years ago

Pandoc supports bibliographies in CSL YAML and JSON formats. However, because of the way Hakyll loads the bibliographies, only BibTeX works.

I think the issue is in Biblio.hs lines 115–20 where the file extension is hardcoded as .bib. Pandoc processes the bibliographies based on their extension. If these lines preserved the extension of the input bibFile, then I think it would work.

Minoru commented 3 years ago

One can recover the original file extension by looking at itemIdentifier; perhaps that'd help? A PR would be most welcome ^_^