Skip to content

Commit

Permalink
Merge pull request #5749 from stsewd/fix-mkdocs-relpath
Browse files Browse the repository at this point in the history
Fix mkdocs relpath
  • Loading branch information
ericholscher committed May 31, 2019
2 parents aed5925 + 87e419a commit 9ca5858
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions readthedocs/doc_builder/backends/mkdocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ def __init__(self, *args, **kwargs):

def get_yaml_config(self):
"""Find the ``mkdocs.yml`` file in the project root."""
mkdoc_path = self.config.mkdocs.configuration
if not mkdoc_path:
mkdoc_path = os.path.join(
self.project.checkout_path(self.version.slug),
'mkdocs.yml',
)
return mkdoc_path
mkdocs_path = self.config.mkdocs.configuration
if not mkdocs_path:
mkdocs_path = 'mkdocs.yml'
return os.path.join(
self.project.checkout_path(self.version.slug),
mkdocs_path,
)

def load_yaml_config(self):
"""
Expand Down Expand Up @@ -248,7 +248,7 @@ def build(self):
'--site-dir',
self.build_dir,
'--config-file',
self.yaml_file,
os.path.relpath(self.yaml_file, self.root_path),
]
if self.config.mkdocs.fail_on_warning:
build_command.append('--strict')
Expand Down

0 comments on commit 9ca5858

Please sign in to comment.