Closed prokie closed 1 year ago
Heya, I'm not sure off hand I'm afraid, but you may want to have a look in your browser's developers tools, to have a look at the order things are being loaded. For instance in firefox:
i.e. tippy needs to have been loaded, before _static/tippy/index...js
Yes, and it is. I am using the the tippy.js with popper.js included but I am still getting this warning in the console.
Source map error: Error: NetworkError when attempting to fetch resource.
Resource URL: file:///proj/build/html/_static/js/tippy.js
Source Map URL: popper.js.map
Does it work for you with the following configuration in conf.py
?
html_js_files = ["js/tippy.js"]
tippy_js = ("js/tippy.js",)
I got it working now, I will update the issue tomorrow with the solution. One problem, that made debugging a lot tougher was this issue with sphinx https://github.com/sphinx-doc/sphinx/issues/11163. With an empty searchindex.js
, no hovers are possible.
To get offline mode working I need to have the following in conf.py
html_js_files = ["js/tippy.js", "js/popper.js"]
tippy_js = ["js/popper.js", "js/tippy.js"]
Where tippy is downloaded from https://unpkg.com/tippy.js@6.3.7/dist/tippy-bundle.umd.min.js and popper is downloaded from https://unpkg.com/@popperjs/core@2.11.6/dist/umd/popper.min.js
By following the steps above and updating the conf.py
got it to work in offline mode. Tested it by clearing the build files and re-compiling.
The .js files were downloaded from sources as suggested here and here) .
However, tooltips for links such as wikipedia and DOI fails to load, even in online mode. Compiling the docs again while connected to the net also does not make them to work. Only when all generated files are removed with make clean
and compiling again (while connected to the net) enables them again.
Hello!
How can I use this package in an offline environment? I tried downloading tippy.js from https://unpkg.com/tippy.js@0.11.3/dist/tippy.js and put it in
_static/js/tippy.js
and then myconf.py
looks like thisBut I get
Uncaught ReferenceError: tippy is not defined
in firefox console