Skip to content

allow .yaml extension for mkdocs configuration file#39

Merged
oprypin merged 1 commit intooprypin:masterfrom
mgor:bug/load_config
Oct 26, 2025
Merged

allow .yaml extension for mkdocs configuration file#39
oprypin merged 1 commit intooprypin:masterfrom
mgor:bug/load_config

Conversation

@mgor
Copy link
Copy Markdown
Contributor

@mgor mgor commented Jul 23, 2025

ran into a problem because i prefer non-shortened extensions (having a mkdocs.yaml):

Error: Config file 'mkdocs.yml' does not exist.

problem being that mkdocs_gen_files.editor.FilesEditor.current has hardcoded mkdocs configuration file to mkdocs.yml.
took a look in mkdocs.config.base.load_config, this method uses _open_config_file context manager, that has support for trying with both yml and yaml.

so the fix is to not specify a configuration file.

@oprypin
Copy link
Copy Markdown
Owner

oprypin commented Oct 26, 2025

Yes this makes sense...

This was initially written here:
8cba306

The fix for mkdocs came a bit later:
mkdocs/mkdocs@06d8b47

We'd just need to check for version compatibility

@oprypin oprypin merged commit e0e3247 into oprypin:master Oct 26, 2025
11 checks passed
@oprypin
Copy link
Copy Markdown
Owner

oprypin commented Oct 26, 2025

It's been ages since the last release of this library. And a lot of older mkdocs versions dropped!

Now someone will need to remind me to make a release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants