Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I override the title of a GitLab wiki page?

I'm am editing pages in a GitLab project wiki.

If I name a page "first-last", the URL is "project/wikis/first-last" and the page title is rendered in sentence case as "First last". If I name a page "first-(last)", the URL is "project/wikis/first-(last)" and the page title is rendered in sentence case as "First (last)".

I want the URL to be "project/wikis/first-last" and the page title to be "First (last)". Thus, I want to override the page title.

My understanding is that GitLab project wikis run on Gollum. According to the Gollum docs page titles can be overridden with one of two methods:

  1. Enable --h1-title. The first H1-level title on the page will override the page title.

  2. Use the metadata directive. If the first line of the page is <!-- --- title: My page title -->, the given value will override the page title.

I don't have access to option 1. I tried option 2 and nothing happened.

How can I override the title of a GitLab wiki page?

like image 261
lofidevops Avatar asked Dec 09 '25 02:12

lofidevops


1 Answers

This is now possible (with GitLab >= 17.2). I quote the documentation:

you can [...] store the title of a wiki page in a front matter block before a page’s contents"

---
title: Page title
---
like image 141
Marc Legendre Avatar answered Dec 11 '25 22:12

Marc Legendre