Skip to content

Commit

Permalink
Environment variable logo names.
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Yeo committed Aug 17, 2020
1 parent 2bb92fd commit 7adb0e0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions docs/iris/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
4 changes: 2 additions & 2 deletions docs/iris/src/sphinxext/generate_logo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.

Expand Down

0 comments on commit 7adb0e0

Please sign in to comment.