Define document with two of the same output formats #6480
-
DescriptionI am working on an extension to develop questions and solutions in a single output (https://github.com/MikeLydeamore/unilur). The idea is to produce to two HTML documents from the single QMD. These two formats share all of the same resources (the CSS and LUA filter), but I can't define two sets of HTML outputs in one extension. I'd like to avoid having to duplicate the lua filter and have two extensions. Is there a way to share assets between extensions, or define multiple HTML output formats in a single extension? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You could try using a format:
html:
theme: flatly
html+sketch:
theme: sketchy Users of your extension should then be able to do something like:
or
I think that should work... Both formats would only be rendered if the user were to target them both, or use |
Beta Was this translation helpful? Give feedback.
-
Great this works a treat. I've implemented here: MikeLydeamore/unilur@9d0ed24 https://github.com/MikeLydeamore/unilur/blob/main/_extensions/unilur/_extension.yml Thanks for your help. |
Beta Was this translation helpful? Give feedback.
You could try using a
+
variant to differentiate the two. For example:Users of your extension should then be able to do something like:
quarto render index.qmd --to extensionname-html
or
quarto render index.qmd --to extensionname-html+sketchy
I think that should work...
Both formats would only be rendered if the user were to target them both, or use
--to all
or the like.