Allow build mkdocs outside root
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
@@ -45,12 +45,12 @@ class BaseMkdocs(BaseBuilder):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
+ self.yaml_file = self.get_yaml_config()
self.old_artifact_path = os.path.join(
- self.version.project.checkout_path(self.version.slug),
+ os.path.dirname(self.yaml_file),
self.build_dir,
)
self.root_path = self.version.project.checkout_path(self.version.slug)
- self.yaml_file = self.get_yaml_config()
# README: historically, the default theme was ``readthedocs`` but in
# https://github.com/rtfd/readthedocs.org/pull/4556 we change it to
