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

Mkdocs: default to "docs" for docs_dir #7766

Merged
merged 2 commits into from
Jan 12, 2021
Merged

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented Dec 17, 2020

This value has been the default since the start of the project
https://github.com/mkdocs/mkdocs/blob/0.13.0/mkdocs/config/defaults.py#L44

We should respect that default value,
(we should actually don't edit it at all #2483).

So, instead of trying to guess the docs dir always,
only try to guess it if the user doesn't have mkdocs.yaml file.

This should avoid any backwards incompatibility and avoid weird bugs to
new users till we completely remove all magic.

Closes #7539

This value has been the default since the start of the project
https://github.com/mkdocs/mkdocs/blob/0.13.0/mkdocs/config/defaults.py#L44

We should respect that default value,
(we should actually don't edit it at all #2483).

So, instead of trying to guess the docs dir always,
only try to guess it if the user doesn't have mkdocs.yaml file.

This should avoid any backwards compatibility and avoid weird bugs to
new users.

Closes #7539
@stsewd stsewd requested a review from a team December 17, 2020 23:30
Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense as a way to fix builds that use docs as a default.

@@ -139,14 +140,12 @@ def append_conf(self):
user_config = self.load_yaml_config()

# Handle custom docs dirs
user_docs_dir = user_config.get('docs_dir')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like we were respecting the users docs_dir setting here, weren't we? This PR just changes it to default to docs for users who didn't define one?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, we still respect the value set by the user

@stsewd stsewd merged commit 7fab0eb into master Jan 12, 2021
@stsewd stsewd deleted the mkdocs-default-to-docs branch January 12, 2021 18:00
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.

Setting up latest mkdocs in RTD configuration does not result with the actual latest mkdocs version.
2 participants