bengal-add-filter

Register custom Jinja/Kida filters in Bengal templates via Python functions.

41|Updated Oct 2, 2025
One-click install
npx skills add https://github.com/lbliii/bengal --skill bengal-add-filter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bengal-add-filter
Source: https://github.com/lbliii/bengal/tree/main/skills/bengal-add-filter
Command: npx skills add https://github.com/lbliii/bengal --skill bengal-add-filter

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill allows you to add custom formatting, filtering, and data transformation capabilities to your Bengal static site templates, enabling more dynamic and personalized content presentation.

Core Features & Use Cases

  • Custom Filters: Define Python functions to format data (e.g., currency, dates) or manipulate strings within your templates.
  • Type Coercion: Handles string inputs from YAML/config files, ensuring your filters work reliably with numeric or other data types.
  • Use Case: You need to display prices in a specific currency format or truncate long text excerpts for a blog post preview. This Skill lets you create reusable filters for these tasks.

Quick Start

Add a new currency filter to your Bengal templates by defining the filter function and registering it before the build process.

Frequently Asked Questions about bengal-add-filter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add custom Jinja filters to Bengal templates?

Add custom Jinja filters by defining Python functions for data transformation and registering them with the Bengal template engine environment prior to the site build process.

What are custom Jinja filters used for in static site generation?

Custom Jinja filters handle specialized data formatting, transformation, and string manipulation within template rendering, enabling dynamic content presentation like currency formatting or text truncation.

How do I handle type coercion for Jinja filter parameters from YAML config files?

Custom filters must handle type coercion for parameters sourced from YAML config files, converting string inputs to numeric or other data types so the functions process data reliably.

Can I use Python functions to format dates and currency in Jinja templates?

Yes, you can define Python functions to create reusable filters for formatting dates and currency, manipulating strings and transforming data within your static site templates.

When do I need to register custom filters with the template engine environment?

You must register custom filters with the template engine environment prior to the site build, ensuring your Python functions are available and properly mapped before template rendering begins.