From 6c0f1bdce03b71963046bdcc036955807dc4ae35 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Tue, 26 Mar 2024 02:05:50 +0530 Subject: [PATCH] readded sidebar logo --- src/assets/sphinx/static/conf.py | 5 +++-- tools/batools/docs.py | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/assets/sphinx/static/conf.py b/src/assets/sphinx/static/conf.py index b0ff2933..b4fa32b1 100644 --- a/src/assets/sphinx/static/conf.py +++ b/src/assets/sphinx/static/conf.py @@ -22,11 +22,12 @@ sys.path.append(os.path.abspath(ballistica_root + assets_dirs['dummy_modules'])) sys.path.append(os.path.abspath(ballistica_root + assets_dirs['efro_tools'])) # -- Options for HTML output ------------------------------------------------- +# for more themes visit https://sphinx-themes.org/ html_theme = 'furo' # python_docs_theme, groundwork, furo, sphinx_rtd_theme html_title = sphinx_settings['project_name'] + ' ' + str(sphinx_settings['version']) + ' documentation' -# for more themes visit https://sphinx-themes.org/ -html_logo = 'https://camo.githubusercontent.com/25021344ceaa7def6fa6523f79115f7ffada8d26b4768bb9a0cf65fc33304f45/68747470733a2f2f66696c65732e62616c6c6973746963612e6e65742f62616c6c6973746963615f6d656469612f62616c6c6973746963615f6c6f676f5f68616c662e706e67' +# do not remove, sets the logo on side panel +html_logo = sphinx_settings['ballistica_logo'] if html_theme == 'furo': html_theme_options = { diff --git a/tools/batools/docs.py b/tools/batools/docs.py index 1c6b5fa3..a592f669 100755 --- a/tools/batools/docs.py +++ b/tools/batools/docs.py @@ -268,10 +268,10 @@ def _run_sphinx( 'copyright': copyright_text, 'version': version, 'buildnum': buildnum, + 'ballistica_logo': 'https://camo.githubusercontent.com/25021344ceaa7def6fa6523f79115f7ffada8d26b4768bb9a0cf65fc33304f45/68747470733a2f2f66696c65732e62616c6c6973746963612e6e65742f62616c6c6973746963615f6d656469612f62616c6c6973746963615f6c6f676f5f68616c662e706e67', # pylint: disable=line-too-long } ) - file_loader = FileSystemLoader(paths['template_dir']) env = Environment(loader=file_loader) index_template = env.get_template('index.rst_t') @@ -316,7 +316,7 @@ def _run_sphinx( subprocess.run( [ 'sphinx-build', - '-c', # config file dir + '-c', # config file dir paths['static_dir'], paths['sphinx_cache_dir'], # input dir paths['build_dir'], # output dir @@ -329,7 +329,7 @@ def _run_sphinx( # slows down build process when rebuilding, # remove after sphinx 7.3.0 is available on PyPi(pip) - shutil.rmtree(paths['build_dir']+'.doctrees') + shutil.rmtree(paths['build_dir'] + '.doctrees') duration = time.monotonic() - starttime print(f'Generated sphinx documentation in {duration:.1f}s.')