Contents

Batch Manifests

Describe many HTML inputs and PNG outputs in one JSON file.

A batch manifest is a JSON object with an optional fonts list and a required cards list:

{
  "fonts": ["path/to/more/fonts"],
  "cards": [
    {
      "input": "html/home.html",
      "output": "static/og/home.png",
      "width": 1200,
      "height": 630
    },
    {
      "input": "html/post.html",
      "output": "static/og/post.png"
    }
  ]
}

Fields§

FieldRequiredMeaning
fontsNoAdditional font directories.
cardsYesOrdered list of inputs and outputs.
cards[].inputYesHTML file to read.
cards[].outputYesPNG file to write.
cards[].widthNoImage width. Defaults to 1200.
cards[].heightNoImage height. Defaults to 630.

Fonts§

The --fonts-dir options and the manifest fonts list are combined. Fonts are loaded once before the first card, so a large batch does not re-register the same font files.

See Fonts and Images for supported formats and registration behavior.

Paths and output§

All paths are resolved from the current working directory. The command creates each output directory as needed.

Cards render in list order. If a card fails, the command stops and exits with status 1. Earlier outputs remain on disk; remove stale output before a build if that matters.

Example§

takumi-render batch cards.json --fonts-dir site/fonts