Prevent capitalisation of directory names in menu
I've noticed that when nav is not specified and mkdocs generates the navigation for me, it removes underscores (_) and capitalises the first letter. Is there a possibility to prevent this behaviour to happen:

This is what the directory structure looks like:

The only way to control the formatting of section names in the nav is to define them in the config.
@waylan that's not possible for me as the markdown files are auto-generated using a Python script, and hence I don't know how many pages I'm going to have.
I need mkdocs to pick up everything that is generated (which it's doing) but I just don't want mkdocs to change the naming conventions I use (i.e., lower case and non-caps).
Can a flag be added to mkdocs.yml to preserve my naming convention?
No, this is not supported.
@waylan do you think we could tweak
def dirname_to_title(dirname):
""" Return a page tile obtained from a directory name. """
title = dirname
title = title.replace('-', ' ').replace('_', ' ')
# Capitalize if the dirname was all lowercase, otherwise leave it as-is.
if title.lower() == title:
title = title.capitalize()
return title
so it only modifies the paths when a variable in the config file is set to true?
We try to keep the number of config settings to a minimum. In fact, any recent changes to the config settings have been to remove settings, not add them. I would suggest exploring using a plugin to accomplish what you want.
The current behavior violates the Principle of Least Astonishment, as navigation menu options in the vast majority of English sites (at least) are in proper case instead of sentence case. One expects proper case to be the default behavior if it cannot be configured.
To turn it around, if there is a strong use case for sentence case, perhaps let those people then implement a plugin.
I just ran into this issue. I would also prefer it to not capitalize and remove the underscores from the files/directories. I have a script that creates a markdown file from each source file and the capitalization and lack of underscores makes things look awkward
Agree its weird that the title from the front matter doesn't let you override the default casing.
I had the same problem, so I found a plugin that solves the problem. lukasgeiter/mkdocs-awesome-pages-plugin
After installing the plugin I added the .pages file inside the docs folder with content:
nav:
- About: index.md
- SSH: ssh
- ...
The result:

The awesome pages plugin does solve this problem but only if the pages have a top-level title:
# this-works
## this-does-not