diff --git a/_templates/breadcrumbs.html b/_templates/breadcrumbs.html new file mode 100644 index 0000000000000000000000000000000000000000..65aae2aee25c6b6636e08d5216890a94cdfb7938 --- /dev/null +++ b/_templates/breadcrumbs.html @@ -0,0 +1,11 @@ +{%- extends "sphinx_rtd_theme/breadcrumbs.html" %} + +{% block breadcrumbs_aside %} +{% if display_gitlab_local %} + <li class="wy-breadcrumbs-aside"> + {% if hasdoc(pagename) and pagename != "search" and pagename != "genindex" %} + <a href="https://{{ gitlab_local_host|default("gitlab.com") }}/{{ gitlab_local_repo }}/{{ theme_vcs_pageview_mode|default("blob") }}/{{ gitlab_local_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a> + {% endif %} + </li> +{% endif %} +{% endblock %} \ No newline at end of file diff --git a/conf.py b/conf.py index 67b73370ff4723387a2e8af339be6621d3fcfb7e..033c06d188e2f15778740e482c3fc205f517b309 100644 --- a/conf.py +++ b/conf.py @@ -54,7 +54,15 @@ exclude_patterns = [] # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'sphinx_rtd_theme' +html_theme = "sphinx_rtd_theme" + +html_context = { + "gitlab_local_host": "git.ostc-eu.org", + "display_gitlab_local": True, # Integrate Gitlab + "gitlab_local_repo": "OSTC/OHOS/docs", # Repo name + "gitlab_local_version": "master", # Version + "conf_py_path": "/", # Path in the checkout to the docs root +} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files,