Module

rendering.template_functions.tables

Table functions for templates.

Provides functions for rendering interactive data tables from YAML/CSV files.

Functions

register
Register table functions with Jinja2 environment.
2 None
def register(env: Environment, site: Site) -> None

Register table functions with Jinja2 environment.

Parameters 2

Name Type Default Description
env Environment

Jinja2 environment

site Site

Site instance

data_table
Render interactive data table from YAML or CSV file. Uses the same underlying implementation as th…
2 Markup
def data_table(env: Environment, path: str, **options: Any) -> Markup

Render interactive data table from YAML or CSV file.

Uses the same underlying implementation as the data-table directive, but can be called directly from templates for more flexibility.

Parameters 2

Name Type Default Description
env Environment

Jinja2 environment (injected)

path str

Relative path to data file (YAML or CSV) **options: Table options - search (bool): Enable search box (default: True) - filter (bool): Enable column filters (default: True) - sort (bool): Enable column sorting (default: True) - pagination (int|False): Rows per page, or False to disable (default: 50) - height (str): Table height like "400px" (default: "auto") - columns (str): Comma-separated list of columns to show (default: all)

Returns

Markup

Markup object with rendered HTML table