Configuration¶
These values go in conf.py.
Setting |
Default |
Description |
|---|---|---|
|
|
Default colour variant: |
|
|
Icon height for directive labels, as any CSS length. The icons have wide margins built in, so the visible mark is smaller than this. |
|
|
Icon height for role labels. It’s smaller so that labels in running text don’t stretch the line as much. |
|
|
Text to show next to each kind’s icon, for example
|
|
|
A label for the top of every page, such as |
|
|
Icon height for directive labels in LaTeX output, as a LaTeX length. |
|
|
Icon height for role labels in LaTeX output, as a LaTeX length. |
auto follows the reader’s operating system or browser setting. It also follows a
theme’s own light/dark switch if the theme sets a data-theme="light" or
data-theme="dark" attribute on <html> or <body>, as Furo, PyData and Book do.
For other themes with a switch, set a fixed variant.
This site’s configuration:
"""Sphinx configuration for the sphinx-eu-ai-label showcase site."""
from sphinx_eu_ai_label import __version__
project = "sphinx-eu-ai-label"
author = "Kristian Glass"
copyright = f"%Y, {author}"
release = __version__
extensions = [
"myst_parser",
"sphinx_eu_ai_label",
]
exclude_patterns = ["_build"]
html_theme = "alabaster"
html_static_path = ["_static"]
html_css_files = ["showcase.css"]
html_theme_options = {
"description": "EU AI labelling icons for Sphinx",
"github_user": "doismellburning",
"github_repo": "sphinx-eu-ai-label",
"github_button": True,
"github_type": "star",
}
# Alabaster has no dark mode, so "auto" would show white icons on a white page to readers whose system is in dark mode
eu_ai_label_variant = "black"