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

1

16

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?

Beason answered 19/7, 2018 at 9:44 Comment(2)
Looks like they are working on it: gitlab.com/gitlab-org/gitlab/-/issues/29043Sheryllshetland
It can be quite annoying in some languages that the hyphen disappears in page titles. In Germany, there is the somewhat pejorative term Deppenleerzeichen for spaces in compound words.Facer
H
0

From what I can find, there might not be a way to do it. I haven't tried using that Gollum flag, yet.

The GitLab documentation has this section:

Notes on Gollum

We only use Gollum as a storage abstraction layer, to handle the mapping between wiki page slugs and files in the repository.

When rendering wiki pages, we don’t use Gollum at all and instead go through a custom Banzai pipeline. This adds some wiki-specific markup, such as Gollum’s [[link]] syntax.

Because we do not make use of most of Gollum’s features, we plan to move away from it entirely at some point. See this epic for reference.

Homeric answered 24/11, 2021 at 18:4 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.