Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 3 commits into from

Conversation

hwmrocker
Copy link
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
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
Member

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
Contributor Author

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

@waylan
Copy link
Member

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
Contributor Author

I resolved the conflict already.

@OrkoHunter
Copy link

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
Copy link
Contributor

oprypin commented Jul 7, 2021

Thanks for the contribution.
I force-pushed only to drop the commits 26f8310 and fa4c23e.
I will merge this but only with edits in #2478
Feel free to review my edits.

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.

None yet

4 participants