Skip to content

Wiki URL changes when title changes

Problem

The URL of a wiki article changes when you change the title. It should not change, because inbound links will break.

As a result users of the wiki may not be able to change page titles.

This issue is a follow-up to gitlab-ce#56637.

Proposal

Previous Proposal
  • Correct behavior for the wiki slugs should mirror other content management systems like WordPress where the slug is decoupled from the title.
  • The slug would remain consistent until edited
  • The slug history would create redirects to prevent broken links

Designs:

Don't derive page URL from title Derive page URL from title
image.png image.png
Scenario Description
Creating a new page
  1. "Derive page URL from title" checkbox is checked by default.
  2. Unchecking it allows you to define a URL that is different from the title.
  3. Behind the scenes, when the checkbox is unchecked, the title is saved in front matter.
  4. We would never show front matter to people editing the page, but we will persist it behind the scenes for users who use front matter for other purposes.
Editing a page
  1. "Derive page URL from title" checkbox is unchecked by default.
  2. Changing the title while the checkbox is unchecked will not change the path.
  3. Path is saved in front matter again as the case above. And we wouldn't show front matter to users editing the page.
Changing the URL of a page

Covered in issue: #257892 (closed)

I believe that covers all the cases to decouple page titles from URLs and support redirections. I don't think decoupling page paths (in the repository) from slugs/URLs is necessary, because it would mostly cause confusion to non-technical people. Previously we asked people to enter a slug before they created a wiki page, and that confused a lot of people and we removed that feature.

Edited by Himanshu Kapoor