feat(presets): add quarto preset
Adds a quarto preset for .qmd scientific documents rendering to self-contained HTML with SSE live-reload. Uses --embed-resources to avoid a _files directory in the common case. No error_parser since quarto errors are heterogeneous (mixed R/Python/pandoc output).
This commit is contained in:
parent
2a9110865b
commit
4665deee6c
3 changed files with 67 additions and 0 deletions
|
|
@ -262,4 +262,22 @@ M.asciidoctor = {
|
|||
reload = true,
|
||||
}
|
||||
|
||||
---@type preview.ProviderConfig
|
||||
M.quarto = {
|
||||
ft = 'quarto',
|
||||
cmd = { 'quarto' },
|
||||
args = function(ctx)
|
||||
return { 'render', ctx.file, '--to', 'html', '--embed-resources' }
|
||||
end,
|
||||
output = function(ctx)
|
||||
return (ctx.file:gsub('%.qmd$', '.html'))
|
||||
end,
|
||||
clean = function(ctx)
|
||||
local base = ctx.file:gsub('%.qmd$', '')
|
||||
return { 'rm', '-rf', base .. '.html', base .. '_files' }
|
||||
end,
|
||||
open = true,
|
||||
reload = true,
|
||||
}
|
||||
|
||||
return M
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue