sphinx_evita.hooks¶
Module Contents¶
Functions¶
Determine if the current project is an EVITA project. |
|
Hook to set the HTML favicon and sidebar image |
|
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 toGITHUB_REPOSITORY)CI_PROJECT_NAMESPACE: GitLab CI project namespace (falls back toGITHUB_REPOSITORY_OWNER)CI_REPOSITORY_URL: GitLab CI repository URL (falls back toREADTHEDOCS_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)¶