readded sidebar logo

This commit is contained in:
Loup-Garou911XD 2024-03-26 02:05:50 +05:30
parent 62c35b3255
commit 6c0f1bdce0
2 changed files with 6 additions and 5 deletions

View File

@ -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 = {

View File

@ -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.')