filename_title
Mkdocs plugin: This plugin for mkdocs changes the page title (e.g. the title in the nav bar) into the filename.
By default, mkdocs uses this order to determine the page title:
- value passed in from config
- value of metadata
title
- content of the first H1 in Markdown content
- convert filename to title
This plugin changes this into:
- value of metadata
title
- convert filename to title
So basically the filename is always used, except if a title
metadata is specified in the file, e.g.
---
title: Some Title
---
The filename gets the following operations applied when converting it into a title:
- the characters
-
(dash) and_
(underline) get replaced by a space - if the whole filename is lowercase, it gets capitalized
Installation
Just execute
sudo pip3 install .
inside the base directory of this repo (setup.py
will be executed)
Usage
Say in your mkdocs.yml
configuration file:
plugins:
- filename_title
- ...