Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qiushiyan/go-quarto
Go interface to Quarto
https://github.com/qiushiyan/go-quarto
Last synced: about 1 month ago
JSON representation
Go interface to Quarto
- Host: GitHub
- URL: https://github.com/qiushiyan/go-quarto
- Owner: qiushiyan
- License: mit
- Created: 2024-04-22T04:33:13.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-04-28T04:41:41.000Z (8 months ago)
- Last Synced: 2024-06-19T11:34:13.475Z (6 months ago)
- Language: Go
- Homepage: https://pkg.go.dev/github.com/qiushiyan/go-quarto
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Quarto
Go interface to Quarto (unofficial).
For more information on Quarto, see the project Github repositories at https://github.com/quarto-dev/
## Usage
Install the package with:
```
go get -u github.com/qiushiyan/go-quarto
```Render a Quarto document
```go
config := &quarto.Config{
Output: "path/to/output.pdf",
Format: "html"
}
config.SetExtra("-M", "echo:true")quarto.Render(ctx, "path/to/source.qmd", config)
```### Specifying output
Currently Quarto does not allow the `--output` argument to contain a directory path (see [discussion](https://github.com/quarto-dev/quarto-cli/issues/2440)), 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.