Skip to content

Kirby 3.6.6

slugs

Set language for slug generator

Set language for slug generator

You can set a language for Kirby's slug generator, so that it uses the language specific settings:

/site/config/config.php
return [
  'slugs' => 'de'
];

Alternatively, you can define custom rules:

Str::$language = [
  'ß' => 'sz'
];

These custom rules have to be stored in a plugin. Custom rules overwrite the slugs option.

Set allowed max length of slugs

You can set a maximum length for page slugs:

/site/config/config.php
return [
  'slugs.maxlength' => 120
];