Go interface to Quarto (unofficial).
For more information on Quarto, see the project Github repositories at https://github.com/quarto-dev/
Install the package with:
go get -u github.com/qiushiyan/go-quarto
Render a Quarto document
config := &quarto.Config{
Output: "path/to/output.pdf",
Format: "html"
}
config.SetExtra("-M", "echo:true")
quarto.Render(ctx, "path/to/source.qmd", config)
Currently Quarto does not allow the --output
argument to contain a directory path (see discussion), this library makes a workaround to copy the source file into the specified directory and render from there. This may require adjustments to the source file as the working directory at render time is now the output directory.