Skip to content

docs: add export templates guide#16

Open
sebdraven wants to merge 1 commit into
mainfrom
docs/export-templates-1256
Open

docs: add export templates guide#16
sebdraven wants to merge 1 commit into
mainfrom
docs/export-templates-1256

Conversation

@sebdraven

Copy link
Copy Markdown
Contributor

Summary

  • Adds a new "Export Templates" page under Configuration options, documenting:
    • what runs a template (ExportTask / on-demand render endpoint) and that it uses minijinja, not Python Jinja2
    • where template files live (system.template_dir), and that both the api and tasks services need read access to it (no upload endpoint exists yet)
    • the only context variable available inside a template (data, a list of Observable objects) and its common fields
    • a note that row|tojson on a whole observable produces malformed JSON in minijinja, with the recommended field-by-field workaround
    • links to annotated example templates added in fix: correct template_dir config key, add example export templates yeti#1282 (extras/templates/json_export.jinja2, extras/templates/csv_export.jinja2)

Fixes yeti-platform/yeti#1256

Test plan

  • Hugo build renders the new page without errors
  • Links to export-configuration and the main repo resolve correctly

Documents what an export template can access (the `data` context variable,
a list of Observable objects and their common fields), where template
files must live (system.template_dir, shared between the api and tasks
services), and links to the annotated example templates added to the main
repo under extras/templates/.

Fixes yeti-platform/yeti#1256
@sebdraven
sebdraven requested a review from tomchop July 1, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No doc for or example export templates exist

1 participant