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 build mkdocs outside root #5539

Merged

Conversation

@stsewd
Copy link
Member

@stsewd stsewd commented Mar 26, 2019

Currently we are expecting that all mkdocs projects have their docs in
their root, but we generate the artifacts relative to their yaml file,
we do the same for sphinx.

https://github.com/rtfd/readthedocs.org/blob/d8a6c24013b7089074b302e7c04edd7998fe90ce/readthedocs/doc_builder/backends/sphinx.py#L42-L51

Fix #5532 (comment)
Closes #5559

Currently we are expecting that all mkdocs projects have their docs in
their root, but we generate the artifacts relative to their yaml file,
we do the same for sphinx.

Fix readthedocs#5532 (comment)
stsewd added 2 commits Mar 27, 2019
Old mkdocs projects rely on an auto generated file
for this.

We write to this location some default values
when we don't find one.
@@ -76,8 +76,6 @@ def get_yaml_config(self):
self.project.checkout_path(self.version.slug),
'mkdocs.yml',
)
if not os.path.exists(mkdoc_path):
return None
Copy link
Member Author

@stsewd stsewd Mar 27, 2019

This was removed to keep compatibility (see the 2nd commit message)

@@ -112,9 +110,6 @@ def append_conf(self, **__):
:raises: ``MkDocsYAMLParseError`` if failed due to known type errors
(i.e. expecting a list and a string is found).
"""
if not self.yaml_file:
self.yaml_file = os.path.join(self.root_path, 'mkdocs.yml')

Copy link
Member Author

@stsewd stsewd Mar 27, 2019

Copy link
Member

@ericholscher ericholscher left a comment

Makes sense. 👍

@ericholscher ericholscher merged commit d53eb2f into readthedocs:master Apr 3, 2019
1 check passed
@stsewd stsewd deleted the allow-build-mkdocs-outside-root branch Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants