Open retostauffer opened 2 years ago
One suggestion- have you returned a pandoc.List
https://pandoc.org/lua-filters.html#module-pandoc.list
Let us know if that works if not I can take a closer look!
Hy @dragonstyle
thanks for your quick reply! I've tried to call pandoc.List(meta.carousel)
already with the same result. The warning is thrown as soon as meta.carousel
(the list) is accessed. Rendering still works, but no access to the meta info.
I have put together a minimal quarto website project which contains the code (slightly modified) as shown above if that helps.
Not urgent/important at all, but would be nice to be able to do this in the future. Thanks in advance!
Thank you this is really helpful - I can reproduce the issue and will take a look!
I encountered a similar problem: quarto shortcodes cannot access full metadata hierarchy unless the hierarchy of a nested key is known, so iterating all values of carousel
is not possible. My solution was to not use shortcode library but a plain Pandoc lua filter.
Thanks @nichtich, I will have a look at your filter! Thanks. In the mean time I also wrote a filter which injects jQuery/HTML.
Goal: I am currently working on a shortcode for bootstrap carousel. To allow to define images, alt, and captions I try to configure it via
.yml
list.My test
index.qmd
looks as follows:My lua script (
carousel.lua
; shortcode extension) in a minimalized version looks as follows:The problem: Processing
meta["reto"]
works as expected, however,meta["carousel"]
(List) gives aWARNING: Unsupported type 'List' for key carousel
.Question: Is it somehow possible to process lists or a better way to access the meta needed, or is this just not possible with quarto/lua?
Any hint would be warmly welcome. Thanks in advance!