Defined constants to reduce duplication

"localtoc.html" and "ethicalads.html" were repeated 3 times. Defined constants to reduce code duplication.
This commit is contained in:
Suzan-Tulinde 2022-04-01 13:53:07 +03:00
parent b109b092a9
commit 284f09cdb8
3 changed files with 18 additions and 4 deletions

View file

@ -2,6 +2,11 @@ import packaging.version
from pallets_sphinx_themes import get_version
from pallets_sphinx_themes import ProjectLink
# Constants ------------------------------------------------------------
ETHICALADS_PATH="ethicalads.html"
LOCALTOC_PATH="localtoc.html"
# Project --------------------------------------------------------------
project = "Flask"
@ -49,10 +54,10 @@ html_context = {
]
}
html_sidebars = {
"index": ["project.html", "localtoc.html", "searchbox.html", "ethicalads.html"],
"**": ["localtoc.html", "relations.html", "searchbox.html", "ethicalads.html"],
"index": ["project.html", LOCALTOC_PATH, "searchbox.html", ETHICALADS_PATH],
"**": [LOCALTOC_PATH, "relations.html", "searchbox.html", ETHICALADS_PATH],
}
singlehtml_sidebars = {"index": ["project.html", "localtoc.html", "ethicalads.html"]}
singlehtml_sidebars = {"index": ["project.html", LOCALTOC_PATH, ETHICALADS_PATH]}
html_static_path = ["_static"]
html_favicon = "_static/flask-icon.png"
html_logo = "_static/flask-icon.png"