Files
jupyterhub/docs/source/_templates/redoc.html

35 lines
986 B
HTML

{%- extends "!layout.html" %}
{# not sure why, but theme CSS prevents scrolling within redoc content
# If this were fixed, we could keep the navbar and footer
#}
{%- block css %}{%- endblock %}
{%- block docs_navbar %}{%- endblock %}
{%- block footer %}{% endblock %}
{%- block body_tag %}
<body>
{%- endblock %}
{%- block extrahead %}
{{ super() }}
<link href="{{ pathto('_static/redoc-fonts.css', 1) }}"
rel="stylesheet"
/>
<script src="{{ pathto('_static/redoc.js', 1) }}"></script>
{%- endblock %}
{%- block content %}
<redoc id="redoc-spec"></redoc>
<script>
if (location.protocol === "file:") {
document.body.innerText = "Rendered API specification doesn't work with file: protocol. Use sphinx-autobuild to do local builds of the docs, served over HTTP."
} else {
Redoc.init(
"{{ pathto('_static/rest-api.yml', 1) }}",
{{ meta.redoc_options | default({}) }},
document.getElementById("redoc-spec"),
);
}
</script>
{%- endblock %}