Naming a page differently than menu

I have created /contents/about.md which renders at /contents/about/ and it is visible at http://example.com/about/. When I click on the “About” on the menu, the below is what I get.

Is there a way to change the “About” header (not menu) to read something else? Thanks!

<img src="//cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/standard10/uploads/gohugo/original/2X/3/3009e27e6df381aba2dd465d5b5943569121125a.png" width=“244” height="370”>

Based on the screenshot I guess you’re using the after-dark theme. The shown header is the title of the page. You can change it in the frontmatter by setting title to whatever your header should be instead.

Right, but by doing so, it will change in both places, menu and header. I am trying to keep the menu as is, but change what the header reads.

This worked!

---
title:  "About and Colophon"
menu: 
  main:
    name: "About"
weight: "2”
---

1 Like

Did you add this post via the frontmatter or the config file to the menu? Could you post the relevant excerpt?

Via the frontmatter. I was using:

---
title: “About"
menu: “main"
weight: “2”
---

Using the frontmatter to set menu items and control names gives more flexibility, I see. I have disabled “lazy” menus.

You can also add a page to a menu in a more “advanced” way via the frontmatter. You’re able to define all attributes of a menu item (e.g. its weight) as well as the displayed name.

You can find a list of all attributes by scrolling up on the linked page.

1 Like