Hi, On 30/08/2023 17:30, Georges Khaznadar wrote:
Dear Alexis,the bug about "import Gumshoe from "./gumshoe-patched.js";" is not due to furo: it is due to the package python-sympy-doc. When I modify the file /usr/share/doc/python-sympy-doc/html/index.html, and replace <script src="_static/scripts/furo.js"></script> by <script src="_static/scripts/furo.js" type="module"></script> then, Firefox accepts to import Gumshoe seamlessly.
I've tried that on python-sympy-doc package with this line: `<script type="module" src="_static/scripts/furo.js"></script>`But with Firefox 117.0 and a local http server, there is another error in the console:
`Uncaught SyntaxError: ambiguous indirect export: default`. That error can be fixed by changing the first line of furo.js from this: `import Gumshoe from "./gumshoe-patched.js";` to this: `import * as Gumshoe from "./gumshoe-patched.js";`Then everything works (light/dark mode can be switched via a button on the page).
I've proposed upstream to do the change if that's ok for them: https://github.com/pradyunsg/furo/discussions/717As a side note (as you are the uploader of python-sumpy-doc, you might be interested), I found that the version of python-sumpy-doc in testing and unstable is missing many files in the html directory:
https://packages.debian.org/sid/all/python-sympy-doc/filelist [...] /usr/share/doc/python-sympy-doc/examples/notebooks/trace.ipynb /usr/share/doc/python-sympy-doc/html/pics/consoleascii.png /usr/share/doc/python-sympy-doc/html/pics/consoleunicode.png /usr/share/doc/python-sympy-doc/html/pics/ipythonnotebook.png /usr/share/doc/python-sympy-doc/html/pics/ipythonqtconsole.png /usr/share/doc/python-sympy-doc/html/pics/pngview1.png /usr/share/doc/python-sympy-doc/sympy-live.shIn bookworm, all HTML files are there, so the issue is only in testing/unstable.
By the way, the file python-sympy-doc also misses a file version.json; this file should be accessed properly only when one opens the file via a http: service, like in: firefox http://localhost/doc/python-sympy-doc/html/index.html Please can you check whether the bug you reported still exists when furo.js is invoked with the type "module"? Please be kind enough to send me another way to reproduce the bug you saw, taking in account that <script src="path_to_the_script/furo.js" type="module"></script> is the right way to use furo.js. Best regards. Georges
-- Alexis Murzeau PGP: B7E6 0EBB 9293 7B06 BDBC 2787 E7BD 1904 F480 937F |
OpenPGP_0xE7BD1904F480937F.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature