Yes, there are questions about this. Unfortunately, the answers are all messy now with information about different things that worked differently across the past five or so years.
So how the heck am I to
I can't believe you need a PhD for this.
Here is my example page with broken embedding: - https://github.com/Sciss/ScalaCollider/wiki/Architecture/2413e094a59df4705e770b2a57ff84a8f0a1e7b4
Here is the actual thing: - https://raw.githubusercontent.com/wiki/Sciss/ScalaCollider/images/ScalaCollider_types.svg
I suppose the problem is this renders as raw text instead of being shown as svg image?
And no, I don't want to set up gh-pages. I want to use the bloody Wiki, because that is what it's supposed to do.
Ok, so apparently this is what happens:
E.g. https://sciss.github.io/ScalaCollider/images/ScalaCollider_types.svg
Not cool, but it works.
You can do that using jsdelivr.net.
Steps:
https://raw.githubusercontent.com/wiki/Sciss/ScalaCollider/images/ScalaCollider_types.svg
to one folder under any repository.raw.githubusercontent.com
to cdn.jsdelivr.net
/gh/
before your username.branch
name.@version
(if you do not do this, you will get the latest - which may cause long-term caching)image
, then add ?sanitize=true
to the path tail of the svg file.For example,
If raw svg file path in github is:
https://raw.githubusercontent.com/yanglr/Beautify-cnblogs/master/images/github-pendant-rightCorner.svg
You can use below:
<a href="https://github.com/yanglr">
<img style="position: absolute; top: 76px; right: 0; border: 0" alt="Fork me on GitHub"
src="https://cdn.jsdelivr.net/gh/yanglr/Beautify-cnblogs/images/github-pendant-rightCorner.svg?sanitize=true"></a>
The result:
Reference:
Link and execute external JavaScript file hosted on GitHub
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With