Filters in file placeholder templates

July 24th, 2025 | Changelog

This release added filters to file placeholder templates.

It also addressed an issue affecting mjs MIME types.

Features & Improvements#

  • You can now use filters and reference data values in file placeholder templates.
cloudcannon.config.yaml
copied
collections_config:
  blog:
    url: /[full_slug|deburr]
  articles:
    url: /[full_slug|unless=permalink]

In this example, CloudCannon will convert the full_slug to basic Latin letters and remove combining diacritical marks.

In this example, CloudCannon will use the full_slug as the output path for files in the Articles Collection, unless you set a value for permalink in the frontmatter of the file.

cloudcannon.config.json
copied
{
  "collections_config": {
    "blog": {
      "url": "/[full_slug|deburr]"
    },
    "articles": {
      "url": "/[full_slug|unless=permalink]"
    }
  }
}

In this example, CloudCannon will convert the full_slug to basic Latin letters and remove combining diacritical marks.

In this example, CloudCannon will use the full_slug as the output path for files in the Articles Collection, unless you set a value for permalink in the frontmatter of the file.

Fixes#

  • Fixed an issue where CloudCannon would return an incorrect MIME type for *.mjs files.
  • Updated dependencies to patch security vulnerabilities.
Open in a new tab