sphinx_evita.hooks

Module Contents

Functions

is_evita_project

Determine if the current project is an EVITA project.

config_branding

Hook to set the HTML favicon and sidebar image

config_theme

Data

API

sphinx_evita.hooks.HERE

None

sphinx_evita.hooks.is_evita_project() bool

Determine if the current project is an EVITA project.

Checks multiple environment variables to detect if the documentation is being built in an EVITA-related repository or organization. Returns True if any of the following conditions are met, either

  • EVITA: Explicitly set to “true” or “1” to indicate an EVITA project,

or the function checks if “evita” appears in any of the environment variables (case-insensitive):

  • CI_PROJECT_NAME: GitLab CI project name (falls back to GITHUB_REPOSITORY)

  • CI_PROJECT_NAMESPACE: GitLab CI project namespace (falls back to GITHUB_REPOSITORY_OWNER)

  • CI_REPOSITORY_URL: GitLab CI repository URL (falls back to READTHEDOCS_GIT_CLONE_URL)

Returns

bool True if the project is identified as an EVITA project, False otherwise.

See also

  • https://docs.gitlab.com/ci/variables/predefined_variables/

  • https://docs.github.com/en/actions/reference/workflows-and-actions/variables

sphinx_evita.hooks.config_branding(app: sphinx.application.Sphinx, config)

Hook to set the HTML favicon and sidebar image

sphinx_evita.hooks.config_theme(app: sphinx.application.Sphinx, config)