Normal page not selectable in menu

I’ve been running into issues with getting a regular page to show up as selected in hugo… I’m hoping it’s just me doing something wrong, but it feels like a bug because the “about” page in my example never shows up… and both IsMenuCurrent and HasMenuCurrent always return false for that entry.

This was originally filed as a bug here: https://github.com/spf13/hugo/issues/3027

Here’s the comment with most of the useful information.

Here’s what I did to run into this:

  • Create a new hugo project
  • Download a theme (in my case after-dark)
  • Create an “About Me” page
  • Add a manual link to the about page on the menu (using the instructions from the docs)

What I expected to happen:

When I visited the “About Me” page, I expected that link in the menu to be selected (as the theme copies some of the rendering code from the “Menus” page of the docs almost directly).

What actually happened:

That link wasn’t selected.

Here’s a sample config:

languageCode = "en-us"
title = "My New Hugo Site"
baseURL = "http://example.org/"
SectionPagesMenu = "main"

[menu]
  [[menu.main]]
    name = "About"
    url = "/about/"

Here’s a sample content/about.md

+++
title = "About Me"
draft = true
date = "2017-02-11T02:28:14-08:00"

+++

after-dark can be cloned from https://github.com/comfusion/after-dark/

Hugo was run using hugo serve -D -t after-dark

Drop the menu config in config.toml and add the menu to the frontmatter:

+++
title = "About Me"
draft = true
date = "2017-02-11T02:28:14-08:00"
menu = "main"
+++
```