Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
{% block relbar1 %}


<!-- for main branch only, do not backport this -->
{%- if branch == 'main' %}
<!-- add a ribbon to show these docs are the main branch -->
<h4 class="ribbon">DOCS PREVIEW</h4>
{%- endif %}

Expand Down
6 changes: 3 additions & 3 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys, os, shutil
import sys, os
import inspect
from unittest.mock import MagicMock #py3 only

Expand Down Expand Up @@ -243,8 +243,8 @@ def __getattr__(cls, name):
html_theme = "classic"

# Add the branch name as a variable that can be used in templates
# this can be set as a sphinx-build option using `-A BRANCH=main`
html_context = {'branch': release}
# Defaults to 'local'if GIT_BRANCH isn't set (e.g. local builds)
html_context = {'branch': os.environ.get('GIT_BRANCH', 'local')}

# linkcheck options
# -----------------
Expand Down