88# from sphinx_book_theme import hash_assets_for_files
99from sphinx .util import logging
1010
11- __version__ = "0.1 .dev0"
11+ __version__ = "0.2 .dev0"
1212current_year = datetime .now ().year
1313organization_name = "pyOpenSci"
1414
1717THIS_PATH = Path (__file__ ).parent .resolve ()
1818THEME_PATH = THIS_PATH / "theme" / "pyos_sphinx_theme"
1919TEMPLATE_PATH = THEME_PATH / "templates"
20- LOGO_LIGHT = str (( THEME_PATH / "static" / "images" / "logo-light-mode.png" ). absolute ()). replace (
21- " \\ " , "/"
22- )
23- LOGO_DARK = str (( THEME_PATH / "static" / "images" / "logo-dark-mode.png" ). absolute ()). replace (
24- " \\ " , "/"
25- )
20+ LOGO_LIGHT = str (
21+ ( THEME_PATH / "static" / "images" / "logo-light-mode.png" ). absolute ()
22+ ). replace ( " \\ " , "/" )
23+ LOGO_DARK = str (
24+ ( THEME_PATH / "static" / "images" / "logo-dark-mode.png" ). absolute ()
25+ ). replace ( " \\ " , "/" )
2626
2727PYOPENSCI_LOGO_PACKAGE_GUIDE = str (
28- (THEME_PATH / "static" / "images" / "pyopensci-logo-package-guide.png" ).absolute ()
28+ (
29+ THEME_PATH / "static" / "images" / "pyopensci-logo-package-guide.png"
30+ ).absolute ()
2931).replace ("\\ " , "/" )
3032PYOPENSCI_PYTHON_PACKAGE_GUIDE = str (
31- (THEME_PATH / "static" / "images" / "pyopensci-python-package-guide.png" ).absolute ()
33+ (
34+ THEME_PATH / "static" / "images" / "pyopensci-python-package-guide.png"
35+ ).absolute ()
3236).replace ("\\ " , "/" )
3337
3438
@@ -64,7 +68,10 @@ def update_config(app):
6468 ]
6569
6670 if "logo" not in theme_options :
67- theme_options ["logo" ] = {"image_dark" : LOGO_DARK , "image_light" : LOGO_LIGHT }
71+ theme_options ["logo" ] = {
72+ "image_dark" : LOGO_DARK ,
73+ "image_light" : LOGO_LIGHT ,
74+ }
6875
6976 if "header_links_before_dropdown" not in theme_options :
7077 theme_options ["header_links_before_dropdown" ] = 4
@@ -81,7 +88,9 @@ def update_config(app):
8188 app .config .copyright = f"{ current_year } , { organization_name } "
8289
8390 # If no html_logo is set then use a stock pyOpenSci logo
84- if not config_provided_by_user (app , "html_logo" ) and not social_cards .get ("image" ):
91+ if not config_provided_by_user (app , "html_logo" ) and not social_cards .get (
92+ "image"
93+ ):
8594 line_color = "#6D597A"
8695 social_cards ["image" ] = str (LOGO_LIGHT )
8796 social_cards ["line_color" ] = line_color
0 commit comments