Skip to content
Discussion options

You must be logged in to vote

This is the key step. The javascript needs to run after the body has been created. I must use the afterBody kwarg. So, changing the function to:

local function ensure_html_deps()
  quarto.doc.add_html_dependency({
    name = 'load_tooltips',
    version = '1.0.0',
    scripts = { { path = "load_tooltips.js", afterBody = true } }
  })
end

and then using the function inside my main return {} worked.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@astrowonk
Comment options

Comment options

You must be logged in to vote
1 reply
@astrowonk
Comment options

Answer selected by astrowonk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
extensions relates to Quarto extensions mechanism lua Issues related to the lua codebase, filter chain, etc
2 participants