Skip to content

Commit

Permalink
Merge branch 'main' into ZipkinEndpointConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb authored Mar 24, 2021
2 parents 8514d47 + 81d6468 commit 792374c
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
# 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 = "furo"

# 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,
Expand Down
Binary file removed api/docs/resources/opentelemetry_logo.jpg
Binary file not shown.
Binary file added docs/public/_static/opentelemetry_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions docs/public/_templates/sidebar/brand.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<a class="sidebar-brand{% if logo %} centered{% endif %}" href="{{ pathto(master_doc) }}">
{% block brand_content %}
{% if not theme_sidebar_hide_name %}
<img class="sidebar-logo" style="width: 40%;" src="{{ pathto('_static/opentelemetry_logo.png', 1) }}" alt="Logo"/>
<span class="sidebar-brand-text" style="font-size: 100%; font-weight: bold; color: grey;">OpenTelemetry C++ {{ release }}</span>
{%- endif %}
{% endblock brand_content %}
</a>`
21 changes: 18 additions & 3 deletions docs/public/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,24 @@
apidir = os.path.join('..', '..', 'api', 'docs')
subprocess.call(['make', 'html'], cwd=apidir)
targetdir = os.path.join(os.getcwd(), 'otel_api')
sourcedir = os.path.join(apidir, 'otel_api')
if os.path.exists(targetdir):
shutil.rmtree(targetdir)
shutil.copytree(os.path.join(apidir, 'otel_api'), targetdir)
shutil.rmtree(targetdir)
os.makedirs(targetdir)

# Now copying the previously created APi documentation. Table of contents
# are filtered out, because those don't go well together with the furo theme.
for fname in os.listdir(sourcedir):
with open(os.path.join(sourcedir, fname), 'r') as fin:
with open(os.path.join(targetdir, fname), 'w') as fout:
skip = False
for line in fin:
if line.startswith('.. contents'):
skip = True
elif not line.startswith(' '):
skip = False
if not skip:
fout.write(line)

# -- General configuration ---------------------------------------------------

Expand Down Expand Up @@ -72,7 +87,7 @@
# 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 = "furo"

# 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,
Expand Down
1 change: 1 addition & 0 deletions docs/public/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
breathe
exhale
furo
2 changes: 1 addition & 1 deletion tools/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ fi

set -e

FIND="find . -name third_party -prune -o -name tools -prune -o -name .git -prune -o -name _deps -prune -o -name .build -prune -o -name out -prune -o -name .vs -prune -o -name opentelemetry_logo.jpg -prune -o"
FIND="find . -name third_party -prune -o -name tools -prune -o -name .git -prune -o -name _deps -prune -o -name .build -prune -o -name out -prune -o -name .vs -prune -o -name opentelemetry_logo.png -prune -o"

# GNU syntax.
SED=(sed -i)
Expand Down

0 comments on commit 792374c

Please sign in to comment.