What's the correct way to add html/site assets via an extension? #10918
-
DescriptionI'm making an extension and adding css works fine via the If I use My current |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Did you read the documentation on creating extensions?
Again, I am directing you to the documentation: https://quarto.org/docs/extensions/lua-api.html |
Beta Was this translation helpful? Give feedback.
-
Ok thanks :) - so it looks like I need the Quarto Lua API ( 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 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! |
Beta Was this translation helpful? Give feedback.
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 thesite_libs
directory, and perhaps something about the directory structure of added resources?For instance I added:
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!