Skip to content
Latchkey

Eleventy "filter not found" / "unknown tag" shortcode in CI

A template calls a filter or shortcode that the active template engine does not know. Eleventy only exposes filters and shortcodes you register in the config, so an unregistered name fails the render.

What this error means

eleventy build fails with "filter not found: X", "unknown block tag" or "Could not find a shortcode named X", naming the template that used it.

eleventy
[11ty] Template render error: (./src/index.njk)
[11ty]   Error: filter not found: dateReadable

Common causes

The filter or shortcode was never registered

The template references a custom filter/shortcode that addFilter or addShortcode in the config does not define.

A config that did not load in CI

A renamed or differently located config file (eleventy.config.js vs .eleventy.js) was not picked up, so registrations are missing.

How to fix it

Register the filter in the config

Define the custom filter or shortcode in the Eleventy config so templates can call it.

eleventy.config.js
export default function (eleventyConfig) {
  eleventyConfig.addFilter('dateReadable', (d) =>
    new Date(d).toISOString().slice(0, 10));
}

Confirm the config is being loaded

  1. Check the config filename matches what your Eleventy version reads.
  2. Run with --config if it lives in a non-default path.
  3. Verify the registration runs (no early return before it).
Terminal
npx @11ty/eleventy --config=eleventy.config.js

How to prevent it

  • Register every custom filter and shortcode in the config.
  • Use the config filename your Eleventy version expects.
  • Keep template references and registrations in sync.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →