No description
- Go 81.4%
- Dockerfile 15.1%
- Makefile 3.5%
| cmd/woodpecker-typst | ||
| testdata | ||
| .containerignore | ||
| .woodpecker.yml | ||
| Dockerfile | ||
| docs.md | ||
| go.mod | ||
| LICENSE | ||
| Makefile | ||
| NOTICE | ||
| README.md | ||
woodpecker-typst
An Apache-2.0-licensed Woodpecker plugin that compiles one Typst source file into one PDF. It bundles Typst 0.15.0 and runs the compiler directly—there is no shell interpolation or arbitrary command setting.
steps:
- name: build-report
image: forgejo.danielthiem.eu/tyde/woodpecker-typst:0.1.0
settings:
source: docs/report.typ
output: artifacts/report.pdf
root: .
font_paths: [assets/fonts]
inputs:
revision: ${CI_COMMIT_SHA}
edition: release
pdf_standards: [a-2b]
Use a separate step (or a matrix) for each document. See docs.md for every setting and plugin-index metadata.
Local use with Podman
podman build -t woodpecker-typst:dev .
podman run --rm -v "$PWD:/workspace:Z" -w /workspace \
-e PLUGIN_SOURCE=examples/hello.typ \
-e PLUGIN_OUTPUT=artifacts/hello.pdf woodpecker-typst:dev
For Woodpecker's local backend, build the wrapper for your platform and ensure
typst is on PATH:
go build -o woodpecker-typst ./cmd/woodpecker-typst
PLUGIN_SOURCE=docs/report.typ ./woodpecker-typst
Troubleshooting
source is requiredmeans the Woodpecker setting was omitted.- Lists and maps must arrive as JSON in direct environment use, for example
PLUGIN_FONT_PATHS='["fonts"]'; Woodpecker serializes YAML values for you. - Set
root: .when imports or assets must be resolved from the repository. - Use
package_pathorpackage_cache_pathfor offline package builds. ignore_system_fonts: truealso omits the image's bundled fonts; supply afont_pathsdirectory containing every required font.
Licenses
The wrapper is Apache-2.0; see LICENSE. The image includes Typst (Apache-2.0) and Alpine-packaged DejaVu, Liberation, and Noto fonts. Their notices are recorded in NOTICE and retained by the relevant image packages where supplied.