@@ -78,7 +78,6 @@ class SocialPlugin(BasePlugin[SocialPluginConfig]):
78
78
79
79
def __init__ (self ):
80
80
self ._executor = concurrent .futures .ThreadPoolExecutor (4 )
81
- self .custom_dir = None
82
81
83
82
# Retrieve configuration
84
83
def on_config (self , config ):
@@ -145,13 +144,6 @@ def on_config(self, config):
145
144
"text" : options .get ("color" , self .color ["text" ])
146
145
}
147
146
148
- # Retrieve custom_dir path
149
- for user_config in config .user_configs :
150
- custom_dir = user_config .get ("theme" , {}).get ("custom_dir" )
151
- if custom_dir :
152
- self .custom_dir = custom_dir
153
- break
154
-
155
147
# Retrieve logo and font
156
148
self ._resized_logo_promise = self ._executor .submit (self ._load_resized_logo , config )
157
149
self .font = self ._load_font (config )
@@ -403,8 +395,8 @@ def _load_logo(self, config):
403
395
path = os .path .join (config .docs_dir , theme ["logo" ])
404
396
405
397
# Allow users to put the logo inside their custom_dir (theme["logo"] case)
406
- if self .custom_dir :
407
- custom_dir_logo = os .path .join (self .custom_dir , theme ["logo" ])
398
+ if theme .custom_dir :
399
+ custom_dir_logo = os .path .join (theme .custom_dir , theme ["logo" ])
408
400
if os .path .exists (custom_dir_logo ):
409
401
path = custom_dir_logo
410
402
@@ -431,8 +423,8 @@ def _load_logo(self, config):
431
423
path = f"{ base } /.icons/{ logo } .svg"
432
424
433
425
# Allow users to put the logo inside their custom_dir (theme["icon"]["logo"] case)
434
- if self .custom_dir :
435
- custom_dir_logo = os .path .join (self .custom_dir , ".icons" , f"{ logo } .svg" )
426
+ if theme .custom_dir :
427
+ custom_dir_logo = os .path .join (theme .custom_dir , ".icons" , f"{ logo } .svg" )
436
428
if os .path .exists (custom_dir_logo ):
437
429
path = custom_dir_logo
438
430
0 commit comments