diff --git a/docs/iris/src/conf.py b/docs/iris/src/conf.py index 9756a113f39..b6052d5cc9d 100644 --- a/docs/iris/src/conf.py +++ b/docs/iris/src/conf.py @@ -164,11 +164,18 @@ def autolog(message): # -- Options for HTML output -------------------------------------------------- +from pathlib import Path + # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_logo = "_static/iris-logo-title.svg" -html_favicon = "_static/iris-logo.svg" +project_prefix = project.lower() +os.environ["PROJECT_PREFIX"] = project_prefix +logo_root = Path("_static") +logo_name = f"{project_prefix}-logo-title.svg" +favicon_name = f"{project_prefix}-logo.svg" +html_logo = logo_root / logo_name +html_favicon = logo_root / favicon_name html_theme = "sphinx_rtd_theme" html_theme_options = { diff --git a/docs/iris/src/sphinxext/generate_logo.py b/docs/iris/src/sphinxext/generate_logo.py index 6df611ecaca..23207e8c091 100644 --- a/docs/iris/src/sphinxext/generate_logo.py +++ b/docs/iris/src/sphinxext/generate_logo.py @@ -11,7 +11,7 @@ from collections import OrderedDict from copy import deepcopy -from os import system +from os import environ from pathlib import Path from PIL.ImageFont import truetype from re import sub as re_sub @@ -35,7 +35,7 @@ 0.6 # How much smaller than the globe the banner text should be. ) WRITE_DIRECTORY = Path("_static") -FILENAME_PREFIX = "iris" # Start of all filenames to be written. +FILENAME_PREFIX = environ["PROJECT_PREFIX"] # Start of all filenames to be written. # The logo's SVG elements can be configured at their point of definition below.