-
I'm trying to write a Lua filter which grabs data from the document's YAML header and injects it into the document's body. Specifically, I want to add a footnote to all level 1 headers. My index.qmd looks as follows:
So far, I've written the following Lua filter (
Which renders to the following. Ideally, I've tried all sorts of ways to access the document's YAML header / metadata, with no success. How do I achieve this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Try this:
The notable trick here is that you need to create a filter that first finds the meta information, and then uses it. The result I get from this filter is |
Beta Was this translation helpful? Give feedback.
-
It works perfectly. I didn't realize how far I was from the solution... sorry for this! But thank you so much for solving my problem none the less! |
Beta Was this translation helpful? Give feedback.
Try this: