Implemented assets server

This commit is contained in:
2025-03-20 03:47:12 +01:00
parent 836a3e0238
commit 87ca1ccc11
23 changed files with 54 additions and 34 deletions

2
sphinx/.gitignore vendored
View File

@@ -1 +1 @@
_static/img/*
assets/img/*

View File

@@ -11,8 +11,8 @@ SPHINX_BUILD_DIR ?= ../docs
# Copy images before running any Sphinx command (except for help)
copy-images:
@echo "Copying images from ../images/ to ./_static/img/..."
cp -r ../images/* ./_static/img/
@echo "Copying images from ../images/ to ./assets/img/..."
cp -r ../assets/img/* ./assets/img/
# "help" target does not copy images
help:

View File

@@ -22,7 +22,7 @@ exclude_patterns = ['docs', 'venv', 'venv/**']
# -- Options for HTML output -------------------------------------------------
html_theme = 'sphinxawesome_theme'
html_static_path = ['_static']
html_static_path = ['assets']
html_sidebars = {
'**': [
@@ -31,8 +31,8 @@ html_sidebars = {
]
}
cymais_logo = "_static/img/logo.png"
html_favicon = "_static/img/favicon.ico"
cymais_logo = "assets/img/logo.png"
html_favicon = "assets/img/favicon.ico"
html_theme_options = {
"show_prev_next": False,

View File

@@ -1,5 +1,5 @@
<div class="sidebar-logo" style="text-align: center; margin-bottom: 1em;">
<img src="{{ pathto("_static/img/logo_cymais.png", 1) }}" alt="Logo" style="max-width: 100%;">
<img src="{{ pathto("assets/img/logo_cymais.png", 1) }}" alt="Logo" style="max-width: 100%;">
</div>

View File

@@ -61,5 +61,5 @@
{% endif %}
</div>
{% endif %}
<script src="{{ pathto('_static/js/current-nav.js', 1) }}"></script>
<script src="{{ pathto('assets/js/current-nav.js', 1) }}"></script>