Skip to content

Installation

Triplate ships as one package per language. Pick the one for your stack — they implement the same language and produce byte-identical output, verified by a shared conformance suite, so a template authored against one runs unchanged against the others. Every package has zero required runtime dependencies.

Published to npm as triplate. Ships as ES modules with bundled TypeScript types (plain JavaScript works too); requires Node 18+ (or any modern bundler / runtime with ESM).

Terminal window
npm install triplate
import { compile, render } from 'triplate';
const tmpl = compile('---\nparams { c: iri }\n---\n?s a ${c}');
tmpl.render({ c: 'http://example.org/Person' });
// → "?s a <http://example.org/Person>"
  • Browse the examples for Query, Data and Publishing — real-world, use-case-based recipes covering every syntax element.
  • See the per-language API reference for the full compile / render surface, accepted value types, custom types and errors.