bavovanachte / sphinx-wavedrom

A sphinx extension that allows including wavedrom diagrams by using its text-based representation
MIT License
32 stars 18 forks source link

Make the wavedrom link configurable #10

Closed wifasoi closed 3 years ago

wifasoi commented 5 years ago

As I understand, the wavedrom link to the JavaScript file is hard-coded. I had a recent issue with github page that can't render the wavedrom diagram (mixed content error -> try to download http content in a https page). There are several work-arround (offline wavedrom), but i think the best way is to leave the user specify (if needed) the link to the necessary scripts in the conf.py.

bavovanachte commented 5 years ago

Hi,

Excellent idea. I hope this is not urgent for you as I won't be able to look at it until after the holidays. Shouldn't take too much time to do when I have the time though.

wifasoi commented 5 years ago

not rush. If I have some time I can tackle this problem (and create a PR).

bavovanachte commented 3 years ago

Proposal in #25

wifasoi commented 3 years ago

25 does work wonders (i can use the cdn version of wavedrom, so that's a plus :) )

(for future references: this will not fix the github pages problem, because link from the auto will redirect to the http version, but at least now you can self host it and fix it in this way)

bavovanachte commented 3 years ago

I'm not entirely sure what the github pages issue is exactly. Is it something that can be fixed on plugin side?

bavovanachte commented 3 years ago

And thanks for trying it out!

wifasoi commented 3 years ago

Is` it something that can be fixed on plugin side?

Don't think so, the fix is to self host an https version. Or ask kindly @Drom to host an https version of the js scripts (and not redirect it and strip the https). Anyway, now i have the option. Thank you for your work :)

drom commented 3 years ago

What is exactly the issue here? Have you tried CDN? https://github.com/wavedrom/wavedrom#html-pages

wifasoi commented 3 years ago

Ahaa, sorry for the mention @drom . I tried with the cdn, and it trigger the cross origin error (the cdn will return the java script from an http source). Maybe I can open an issue on your project (with proper screenshot), Instead of whine behind your back :)

drom commented 3 years ago

it might be a CDN issue: https://github.com/cdnjs/cdnjs