From efdb5cf7f0d80e7e0d315719e9605ef6e9c23f04 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Mon, 2 Sep 2019 15:39:48 -0400 Subject: [PATCH] Properly build `ValidationError` message for `custom_dir`. Fixes #1849 --- docs/about/release-notes.md | 3 ++- mkdocs/config/config_options.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/about/release-notes.md b/docs/about/release-notes.md index 2af83693..1d36f4fe 100644 --- a/docs/about/release-notes.md +++ b/docs/about/release-notes.md @@ -56,7 +56,8 @@ your global navigation uses more than one level, things will likely be broken. ### Other Changes and Additions to Version 1.1 -* Bugfix: Exclude Markdown files and READMEs from theme. (#1766). +* Bugfix: Properly build `ValidationError` message for `custom_dir` (#1849). +* Bugfix: Exclude Markdown files and READMEs from theme (#1766). * Bugfix: Account for encoded URLs (#1670). * Bugfix: Ensure theme files do not override `docs_dir` files (#1671). * Bugfix: Do not normalize URL fragments (#1655). diff --git a/mkdocs/config/config_options.py b/mkdocs/config/config_options.py index e5551393..7012804b 100644 --- a/mkdocs/config/config_options.py +++ b/mkdocs/config/config_options.py @@ -456,7 +456,7 @@ class Theme(BaseConfigOption): if 'custom_dir' in theme_config and not os.path.isdir(theme_config['custom_dir']): raise ValidationError("The path set in {name}.custom_dir ('{path}') does not exist.". - format(path=theme_config['custom_dir'], name=self.name)) + format(path=theme_config['custom_dir'], name=key_name)) config[key_name] = theme.Theme(**theme_config)