Skip to content

What's the correct way to add html/site assets via an extension? #10918

Discussion options

You must be logged in to vote

Ok thanks :) - so it looks like I need the Quarto Lua API (quarto.doc.add_html_dependency()). Is it worth adding anything to this section of the docs along the lines of: this call allows you to add site wide resources to the site_libs directory, and perhaps something about the directory structure of added resources?

For instance I added:

quarto.doc.add_html_dependency({
    name = "carpentries-images",
    version = "1.0.0",
    resources = {"images"}
  })

which means I now have access to these images in _site/site_libs/quarto-contrib/carpentries-images-1.0.0/images.

Now just need to work out how to add this path to my metadata with the lua so I don't have to type it out all the time!

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

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

Answer selected by astroDimitrios
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
3 participants