> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# jtreutel/jinja

Render Jinja templates using a Python container.


## Commands

### render

This command renders Jinja templates at the specified paths.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `outputdir` | string |  | Local path to which render Jinja templates will be written. |
| `path` | string |  | Path to template file or directory containing .j2 or .jinja files. |

## Jobs

### render

This job renders Jinja templates at the specified paths.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `outputdir` | string |  | Local path to which render Jinja templates will be written. |
| `path` | string |  | Path to template file or directory containing .j2 or .jinja files. |
| `persist-workspace` | boolean | false | Persist files to (cci) workspace for use in subsequent jobs |
| `workspace-path` | string | . | Path of the workspace to persist to relative to workspace-root. |
| `workspace-root` | string | . | Workspace root path that is either an absolute path or a path relative to the working directory. Defaults to '.' (the working directory) |

## Executors

### default

This is a Docker executor that includes the specified version of Python.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `tag` | string | 3.9 | Pick a specific cimg/python image variant: https://hub.docker.com/r/cimg/python/tags
 |

## Examples

### example

The orbs is called three times in the config below.  Twice it is called as a command in the "jobs" section where it renders a single template and a directory of template.  It is also called once as a job in the "workflows" section.


```yaml
version: '2.1'
orbs:
  jinja: jtreutel/jinja@0.1.1
jobs:
  render-directory:
    executor: jinja/default
    steps:
      - checkout
      - jinja/render:
          outputdir: rendered/
          path: templates/
  render-file:
    executor: jinja/default
    steps:
      - checkout
      - jinja/render:
          outputdir: rendered/
          path: templates/foo.j2
workflows:
  main:
    jobs:
      - render-file
      - render-directory
      - jinja/render:
          outputdir: rendered/
          path: templates/
```