1

I'm trying to automatically generate a bibliography in Hakyll. I'm using the nocite pandoc feature to generate a list of all publications in a .bib file. But, I'd like to have different sections (i.e. peer reviewed, theses, posters, etc.)

My idea on how to do this was to have a template like the following:

---
title: $title$
---
**Section: $title**
---
nocite: |
  @*
---

Then, I'd do the following:

  • Use pandocBiblioCompiler to generate the page with the bibliography for each .bib file, applying the above template
  • Concatenate them into one page
  • Apply my main template (sidebar, navigation, etc.) to get the final page.

Is this possible? How do I concatenate multiple pages into one page in my site.hs?

apaderno
  • 28,547
  • 16
  • 75
  • 90
jmite
  • 8,171
  • 6
  • 40
  • 81

1 Answers1

1

After some searching, it looks like the solution has two parts:

  • Use saveSnapshot to record the results of pandocBiblioCompiler for each page
  • Use makeItem =<< applyTemplateList template context =<< loadAllSnapshots "pubs/*" "biblio" to load the snapshots, concatenate them, and turn them into an Item
jmite
  • 8,171
  • 6
  • 40
  • 81