Skip to content

Allow dots in Pages' path_prefix

Especially some technical documentation sites would like to use version numbers as a path_prefix in GitLab Pages' parallel Deployments. But the fact that our path slugifyier converts dots . to dashes - makes this more difficult.

Since dots are allowed characters in URL paths, it should be permissible to update our slugifier to leave dots in place.

Implementation guide

  1. Introduce an argument allow_dots to Gitlab::Utils.slugify to change the regex to allow dots. Make sure the unit tests are updated accordingly
  2. Update Gitlab::Pages::UrlBuilder.path_prefix to use slugify with allow_dots: true
Edited by Janis Altherr