Debian Codegraph @

docs/source/_templates/redoc.html

raw
1 {# djlint: off #}
2 {%- extends "!layout.html" %}
3 {# not sure why, but theme CSS prevents scrolling within redoc content
4 # If this were fixed, we could keep the navbar and footer
5 #}
6 {% block css %}
7 {% endblock css %}
8 {% block docs_navbar %}
9 {% endblock docs_navbar %}
10 {% block footer %}
11 {% endblock footer %}
12 {%- block body_tag -%}<body>{%- endblock body_tag %}
13 {%- block extrahead %}
14 {{ super() }}
15 <link href="{{ pathto('_static/redoc-fonts.css', 1) }}" rel="stylesheet" />
16 <script src="{{ pathto('_static/redoc.js', 1) }}"></script>
17 {%- endblock extrahead %}
18 {%- block content %}
19 <redoc id="redoc-spec"></redoc>
20 <script>
21 if (location.protocol === "file:") {
22 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."
23 } else {
24 Redoc.init(
25 "{{ pathto('_static/rest-api.yml', 1) }}",
26 {{ meta.redoc_options | default ({}) }},
27 document.getElementById("redoc-spec"),
28 );
29 }
30 </script>
31 {%- endblock content %}
32 {# djlint: on #}