It is certainly possible but it is not very pretty. The following will
do as a page transformer:
biblio :: Compiler (Page Pandoc) (Page Pandoc)
biblio = unsafeCompiler $ \(Page md b) -> do
refs <- readBiblioFile "foo.bibtex"
Page md <$> processBiblio "foo.xml" refs b
A problem will be that you'll have to rebuild your site whenever you
change the foo.bibtex/foo.xml files. The latter I can't do anything
about, due to the API pandoc exposes. The former could be fixed but
this would require writing your own Binary and Writable instances for
[Reference], so it's possible, possibly outside the scope of this
mail.
The resulting biblio compiler is something you can easily hook up in
your Compiler pipeline, something I explained here [1]. You'll want to
replace the pageRenderPandoc function with something built from biblio
and the combinators in Hakyll.Web.Pandoc [2].
[1]: https://groups.google.com/d/topic/hakyll/UyLmJClgWgE/discussion
[2]: http://jaspervdj.be/hakyll/reference/Hakyll-Web-Pandoc.html
Hope this helps,
Cheers,
Jasper