diff --git a/pandoc/paper.lua b/pandoc/paper.lua index dd8b87e..a1d6f29 100644 --- a/pandoc/paper.lua +++ b/pandoc/paper.lua @@ -23,7 +23,17 @@ function yamldata(data) -- A bit ridiculous to do this to get strings newdata.venue = pandoc.write(pandoc.Pandoc{data["venue"]}, 'html') newdata.year = pandoc.write(pandoc.Pandoc{data["year"]}, 'html') - newdata.files = data["files"] or pandoc.List() + local files = data["files"] or pandoc.List() + + newdata.files = files:map(function(data) + local newfile = {} + + newfile.text = pandoc.write(pandoc.Pandoc{data.text}, 'html') + newfile.type = pandoc.write(pandoc.Pandoc{data.type}, 'html') + newfile.src = pandoc.write(pandoc.Pandoc{data.src}, 'html') + + return newfile + end) return newdata diff --git a/src/index.md b/src/index.md index 556e5ba..d75f4da 100644 --- a/src/index.md +++ b/src/index.md @@ -63,6 +63,13 @@ title: Yet another yaml parser authors: Templato Urnehm venue: Proceedings of Nihilism year: 2025 +files: + - text: Paper + type: pdf + scr: foo.pdf + - text: Bibtex + type: bib + src: foo.bib ``` ``` paper