Skip to content

Allow mkdocs.yaml when '--config' is not passed#2206

Closed
hwmrocker wants to merge 3 commits intomkdocs:masterfrom
hwmrocker:master
Closed

Allow mkdocs.yaml when '--config' is not passed#2206
hwmrocker wants to merge 3 commits intomkdocs:masterfrom
hwmrocker:master

Conversation

@hwmrocker
Copy link
Copy Markdown
Contributor

We wanted to give our colleagues to possibility to build docs automatically when they put a mkdocs.yml in the docs folder of their repository. But it happened often, that they used .yaml instead the .yml.

When this PR is accepted, it will look first look for mkdocs.yml when --config is not provided. If this file is not present, it will try to find mkdocs.yaml.
When both are not present, it behaves like before.
When both are present, it behaves like before.
If only the .yaml version it present, this one will be used as the config file.

@hwmrocker
Copy link
Copy Markdown
Contributor Author

If you like this PR I would appreciate when you add the hacktoberfest-accepted lable to this PR. As you might know hacktoberfest is now opt-in only.

@waylan
Copy link
Copy Markdown
Contributor

waylan commented Oct 27, 2020

Interesting patch. While I understand why some might want this, I'm not sure I like the idea. The file extension is clearly documented. So just use the correct extension. I'll have to think about this.

In any event, at a minimum, this would need a note added to the release notes.

@hwmrocker
Copy link
Copy Markdown
Contributor Author

Of course, I added a line to the release notes. Hope this is the correct way to do so.

@waylan
Copy link
Copy Markdown
Contributor

waylan commented Oct 29, 2020

There is a conflict you need to resolve. You should have rebased against master prior to adding the note. Then you could have added the note to the new (under development) section of the release notes which has recently been added.

@hwmrocker
Copy link
Copy Markdown
Contributor Author

I resolved the conflict already.

@OrkoHunter
Copy link
Copy Markdown

The file extension is clearly documented. So just use the correct extension.

Agreed that the documentation is clear enough. :) The problem in our case (https://github.com/backstage/backstage) is that most of the other YAML files have .yaml extension. And so when users go ahead and create mkdocs.yml, they look at other existing YAML files in the project and use mkdocs.yaml. The problem often takes long time to debug. It is just a costly mistake, and mkdocs can help solve this by allowing both file extensions! 🙏

@oprypin

This comment was marked as abuse.

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.

4 participants