Skip to content

Commit

Permalink
Don't touch docs_dir in case the Dir class is used in a non-mkdocs co…
Browse files Browse the repository at this point in the history
…nfig

Fixes #8
  • Loading branch information
oprypin committed Jan 31, 2024
1 parent 52c451e commit fcc9286
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mkdocs_same_dir/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ def on_files(self, files, config):

def _replace_validation(self, config, *args, **kwargs):
# HACK: Also make so it doesn't realize we're using a subdirectory for the site dir and such.
config["docs_dir"] = os.path.join(config["docs_dir"], ".")
if "docs_dir" in config:
config["docs_dir"] = os.path.join(config["docs_dir"], ".")


def _is_path_under(base, path):
Expand Down

0 comments on commit fcc9286

Please sign in to comment.