Properly support config_file_path being None

* Prevent error when the config file is a stream, to support `-` as the config.
* Fix type annotations and edge cases when `config_file_path` is None
* Properly prevent users setting `config_file_path` in mkdocs.yml - this was not intended.
This commit is contained in:
Oleh Prypin
2023-06-16 16:11:12 +02:00
parent 285461a3e7
commit d5bb15fa10
8 changed files with 31 additions and 30 deletions

View File

@@ -1021,6 +1021,12 @@ Therefore, defining paths in a parent file which is inherited by multiple
different sites may not work as expected. It is generally best to define
path based options in the primary configuration file only.
The inheritance can also be used as a quick way to override keys on the command line - by using stdin as the config file. For example:
```bash
echo '{INHERIT: mkdocs.yml, site_name: "Renamed site"}' | mkdocs build -f -
```
[Theme Developer Guide]: ../dev-guide/themes.md
[pymdk-extensions]: https://python-markdown.github.io/extensions/
[pymkd]: https://python-markdown.github.io/