Guess page title from parent of index.md

Hugo guesses the title of a page by humanizing and title-ifying the filename of the file that is generated. When using the page-title/index.md style of pages, the page has Index as the guessed title.

I think Hugo should detect when the file name is index.md or _index.md and use the parent folder’s name as the guess for the page title instead. The name of the parent folder is often the title I want for the page as well, so this would save a little bit of time whenever I make a new page.

1 Like