A tern template for plantuml diagrams
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
yuuhikaze 53abe45883 feat: initial plantuml tern template
Extracted from the resources repo, where the converters lived as loose Lua
scripts shared through a flake input. Packaging each as its own tern template
lets consumers install it with tern --update instead of depending on that
flake.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018d7Ytt5wb8uarCFsh15kVo
2026-10-04 15:45:26 -05:00
converters feat: initial plantuml tern template 2026-10-04 15:45:26 -05:00
AGENTS.md feat: initial plantuml tern template 2026-10-04 15:45:26 -05:00
README.md feat: initial plantuml tern template 2026-10-04 15:45:26 -05:00
tern.toml feat: initial plantuml tern template 2026-10-04 15:45:26 -05:00

plantuml-template

A tern template for rendering PlantUML diagrams to SVG.

Setup

In your project's .tern/config.toml:

[[templates]]
name = "plantuml-template"
url = "https://git.yhkze.net/tern/plantuml-template.git"

Usage

# 1. Install/update the template
tern --update

# 2. Render your diagrams
tern

# Re-render everything, including files tern has already seen
tern --force

What it does

Step What happens
tern --update Clones/pulls the template and installs the converter
tern Runs plantuml on .puml files in docs/diagrams/, writing SVG to docs-html/diagrams/

Requirements

plantuml must be on PATH. On Nix:

nix shell nixpkgs#plantuml

Rendering needs a JRE and, for some diagram types, Graphviz — the nixpkgs package pulls both in.

Customizing

Paths and flags belong in your .tern/config.toml, not in the installed copy — tern --update overwrites .tern/data/ and recomputes profiles from the manifest:

[[templates]]
name = "plantuml-template"
url = "https://git.yhkze.net/tern/plantuml-template.git"

[templates.overrides.plantuml]
source_root = "diagrams"
output_root = "build/diagrams"
options = ["-tpng"]

The converter forwards options[1] verbatim to plantuml and resolves the output directory with realpath, because PlantUML interprets a relative -o against each input file's own directory rather than the working directory.