Skip to content
Discussion options

You must be logged in to vote

Write a pre-render script in whatever languages (lua, bash, typsescript, R, python) or Lua filters/shortcodes.

The native "include" shortcode runs before anything and is not in Lua.
You can choose at each phase your filters run: https://quarto.org/docs/advanced/quarto-ast.html#targeting-of-ast-processing-phases

A pre-render script cannot modify the source files, correct?

Yes it can, but you might need to have at least a "placeholder" file.

Note that, as documented, the include shortcode will copy/paste everything from your files, including YAML header which might overwrite each other (last wins).

You can look at other extensions to get inspired (in respect to the licenses): https://m.ca…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by RudolfVonKrugstein
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants