@@ -48,7 +48,6 @@ class SocialPlugin(BasePlugin[SocialConfig]):
4848
4949 def __init__ (self ):
5050 self ._executor = concurrent .futures .ThreadPoolExecutor (4 )
51- self .custom_dir = None
5251
5352 # Retrieve configuration
5453 def on_config (self , config ):
@@ -107,13 +106,6 @@ def on_config(self, config):
107106 "text" : options .get ("color" , self .color ["text" ])
108107 }
109108
110- # Retrieve custom_dir path
111- for user_config in config .user_configs :
112- custom_dir = user_config .get ("theme" , {}).get ("custom_dir" )
113- if custom_dir :
114- self .custom_dir = custom_dir
115- break
116-
117109 # Retrieve logo and font
118110 self ._resized_logo_promise = self ._executor .submit (self ._load_resized_logo , config )
119111 self .font = self ._load_font (config )
@@ -365,8 +357,8 @@ def _load_logo(self, config):
365357 path = os .path .join (config .docs_dir , theme ["logo" ])
366358
367359 # Allow users to put the logo inside their custom_dir (theme["logo"] case)
368- if self .custom_dir :
369- custom_dir_logo = os .path .join (self .custom_dir , theme ["logo" ])
360+ if theme .custom_dir :
361+ custom_dir_logo = os .path .join (theme .custom_dir , theme ["logo" ])
370362 if os .path .exists (custom_dir_logo ):
371363 path = custom_dir_logo
372364
@@ -393,8 +385,8 @@ def _load_logo(self, config):
393385 path = f"{ base } /.icons/{ logo } .svg"
394386
395387 # Allow users to put the logo inside their custom_dir (theme["icon"]["logo"] case)
396- if self .custom_dir :
397- custom_dir_logo = os .path .join (self .custom_dir , ".icons" , f"{ logo } .svg" )
388+ if theme .custom_dir :
389+ custom_dir_logo = os .path .join (theme .custom_dir , ".icons" , f"{ logo } .svg" )
398390 if os .path .exists (custom_dir_logo ):
399391 path = custom_dir_logo
400392
0 commit comments