File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -812,10 +812,14 @@ def run_validation(self, value: object) -> theme.Theme:
812812
813813 themes = utils .get_theme_names ()
814814 if theme_config ['name' ] is not None and theme_config ['name' ] not in themes :
815- raise ValidationError (
816- f"Unrecognised theme name: '{ theme_config ['name' ]} '. "
817- f"The available installed themes are: { ', ' .join (themes )} "
818- )
815+ message = f"Unrecognised theme name: '{ theme_config ['name' ]} '."
816+ if theme_config ['name' ] in ('mkdocs' , 'readthedocs' ):
817+ message += f"\n Additional dependency is needed:\n pip install properdocs-theme-{ theme_config ['name' ]} "
818+ elif themes :
819+ message += f" The available installed themes are: { ', ' .join (themes )} "
820+ else :
821+ message += " There aren't any themes installed."
822+ raise ValidationError (message )
819823
820824 if not theme_config ['name' ] and 'custom_dir' not in theme_config :
821825 raise ValidationError ("At least one of 'name' or 'custom_dir' must be defined." )
You can’t perform that action at this time.
0 commit comments