Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Title override syntax #539

bootstraponline opened this Issue · 16 comments

5 participants


A title override syntax (not rendered in page content) will enable the title to change while retaining the URL.

I'm not sure about the syntax. Here's one possibility.
<!-- title: The new title! -->

As mentioned on #536


It would be great if I can override title somehow. I want to use Latin symbols for URL but Cyrillic for title.



Different languages for page name and page title would be great.


What do you think about this for the title override syntax?

```title:New Title```

From my point of view it would be nice if I can specify title by first h1. In this case auto generated title (by filename) should appear only when page body is not begging with h1.

But title:New Title is better then nothing :)


I was wrong - there is no problem with file name in web. So - @roman-zaharenkov idea is very good. First h1 should be used as page title. While file name will be given via new page dialog or from a link to non-existent page. Or by hand when editing locally.


h1 as page title has a number of problems which is why it was removed.

  • How do you change the title without adding a h1?
  • How do you retain the existing title and still use a h1?
  • How do you prevent double rendering of title in page and then the h1?

This issue calls for a title override syntax (not rendered in page content) and h1 doesn't meet that criteria.


OK. Here is current state of GH Wiki:

GH Wiki - Page Title

What's do we have here? First h1 doesn't show at rendered page at all. So - it can be used as a Page Title. There is no problem with double rendering because there is no First h1 title right now.
OK, there is no problem with first h1 because it doesn't render. So we can use it as Page Title without any problems. Is it?


@nilcolor We're not talking about the GH wiki. Try again in open source gollum and you'll see a different result.

Deleting the first h1 is a massive bug on part of .com.


@bootstraponline ic...
So, maybe something like modeline directives?

<!-- gollum: title="Page Title" syntax=markdown -->



The syntax has to be unique enough that it won't conflict with text a user might enter normally while remaining easy to type. Some alternatives:

<title:Page Title>.

<!-- gollum: title="Page Title" -->

[[title:Page Title]]

`gollum:title:Page Title`

I'm not sure any of these are particularly compelling.


The [[title:Page Title]] at least matches the syntax used for [[_TOC_]]. But the metadata that was implemented in #419 might be an even better place to put it.


If we use the metadata syntax it'd look like this:

<!-- --- title: Page Title -->


I think the metadata syntax as pointed out by @dekimsey is the way to go. As discussed on #576, there will also be a --h1-title flag so if you want h1 to define the title that'll be available. It's behind a flag because if it were default, there'd be no way to use a h1 without changing the title of a page. <h1> != <title>


The default header that appears in the page is now replaced by the first h1 #576. The <title> tag can be overridden using metadata. I opened #579 to track overriding the <title> tag with the first h1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.