[IMP] technical: remove warning about scripts assets
Before this commit, the following warning was displayed at compilation: "RemovedInSphinx30Warning: To modify script_files in the theme is deprecated. Please insert a <script> tag directly in your theme instead."
This commit is contained in:
parent
541bd54521
commit
54f0228dae
@ -1,11 +1,11 @@
|
|||||||
{% extends "basic/layout.html" %}
|
{% extends "basic/layout.html" %}
|
||||||
|
{%- block scripts %}
|
||||||
{% set script_files = script_files + [
|
{{ super() }}
|
||||||
'_static/jquery.min.js',
|
<script type="text/javascript" src="{{ pathto('_static/jquery.min.js', 1) }}"></script>
|
||||||
'_static/bootstrap.js',
|
<script type="text/javascript" src="{{ pathto('_static/bootstrap.js', 1) }}"></script>
|
||||||
'_static/doc.js',
|
<script type="text/javascript" src="{{ pathto('_static/doc.js', 1) }}"></script>
|
||||||
'_static/jquery.noconflict.js',
|
<script type="text/javascript" src="{{ pathto('_static/jquery.noconflict.js', 1) }}"></script>
|
||||||
] %}
|
{%- endblock %}
|
||||||
|
|
||||||
{% set classes = [] %}
|
{% set classes = [] %}
|
||||||
{% if pagename == master_doc %}
|
{% if pagename == master_doc %}
|
||||||
|
@ -4,7 +4,7 @@ import posixpath
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
from docutils import nodes
|
from docutils import nodes
|
||||||
from sphinx import addnodes, util
|
from sphinx import addnodes, util, builders
|
||||||
from sphinx.locale import admonitionlabels
|
from sphinx.locale import admonitionlabels
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -42,6 +42,11 @@ class BootstrapTranslator(nodes.NodeVisitor, object):
|
|||||||
]
|
]
|
||||||
|
|
||||||
def __init__(self, builder, document):
|
def __init__(self, builder, document):
|
||||||
|
# order of parameter swapped between Sphinx 1.x and 2.x, check if
|
||||||
|
# we're running 1.x and swap back
|
||||||
|
if not isinstance(builder, builders.Builder):
|
||||||
|
builder, document = document, builder
|
||||||
|
|
||||||
super(BootstrapTranslator, self).__init__(document)
|
super(BootstrapTranslator, self).__init__(document)
|
||||||
self.builder = builder
|
self.builder = builder
|
||||||
self.body = []
|
self.body = []
|
||||||
|
Loading…
Reference in New Issue
Block a user