{
  "schema": "leumas.docs.page/1",
  "id": "adapter:domain/a-templates",
  "slug": "adapters/domain/a-templates",
  "kind": "capabilities",
  "bucket": "package",
  "title": "a-templates (adapter system)",
  "name": "a-templates",
  "eyebrow": "adapter system",
  "chip": null,
  "summary": "Templating capability pack: render an inline template ({{path}}, {{#each}}, {{#if}}), build a minimal HTML card, or turn an array of objects into a Markdown table. Reuses a tiny dependency-free...",
  "keywords": [
    "a-templates",
    "templating",
    "tiny",
    "markdown",
    "card",
    "leumas a templates",
    "html",
    "template"
  ],
  "audience": "both",
  "funnel": {
    "product": null,
    "cta": null
  },
  "body": "# a-templates (adapter system)\n\nTemplating **capability pack**. Ported from `leumas-middleware/lib/a.templates` — the 3 core adapters.\nStripped: express `server.js`/`router.js`, `public/`, `scripts/`, `docs/`.\n\nThe tiny template engine (`{{path}}`, `{{#each}}`, `{{#if}}`) is ESM-ported to\n[`./helpers/template.js`](./helpers/template.js) (source was CommonJS `require`/`module.exports`). The\nthree adapters are folded into `index.js`.\n\n## Tools (`adapters`)\n\n| tool | args | result |\n|------|------|--------|\n| `render-template` | `{ template, data?, contentType? }` | `{ contentType, output, length }` |\n| `html-card` | `{ title, subtitle?, items? }` | `{ contentType: 'text/html', output, length }` |\n| `markdown-table` | `{ rows: [{...}, ...] }` | `{ contentType: 'text/markdown', output, length }` |\n\n`render-template` auto-detects `text/html` vs `text/plain` from the template unless `contentType` is\ngiven. `markdown-table` unions keys across rows for the header and escapes `|`.\n",
  "source": {
    "path": "shared/engines/adapters/domain/a-templates/README.md",
    "blobSha": "",
    "commit": "",
    "committedAt": "",
    "provenance": "no-git",
    "bytes": 1151,
    "hash": "4d03b052f15986cdff6b1f256d73ebc29eb6a3ee"
  },
  "urls": {
    "html": "/p/adapters/domain/a-templates",
    "json": "/docs/adapters/domain/a-templates.json",
    "md": "/docs/adapters/domain/a-templates.md"
  },
  "links": {
    "composes": [],
    "usedBy": [],
    "product": [],
    "howTo": [],
    "skills": []
  }
}
