Embed Github Gist

Obsidian doesn’t seem to support rendering embedded Github Gist ?

I tried to just put the link https://gist.github.com/louis030195/80ce2fdd2c475bef09267399b0be0b79

or use the script thing <script src="https://gist.github.com/louis030195/80ce2fdd2c475bef09267399b0be0b79.js"></script>.

Is it possible ?

1 Like

I haven’t tried this myself, but have you tried using an iframe?

Tried different iframe, no success

<iframe frameborder=0 style="min-width: 200px; width: 60%; height: 460px;" scrolling="no" seamless="seamless" srcdoc='<html><body><style type="text/css">.gist .gist-data { height: 400px; }</style><script src="https://gist.github.com/louis030195/80ce2fdd2c475bef09267399b0be0b79.js"></script></body></html>'></iframe> 

I couldn’t figure out some JS dark magic either yet

<script> tags are not supported for security reasons, and from this and this stack overflow questions it seems you won’t be able to get GitHub’s contents through an iframe. In my opinion, this might fall in plugin territory with some access through GitHubs API so I’ll move it to that category.

1 Like

Can’t we do some research on Jupiter Notebook or ‘Webview’ in Electron?
The latter appears to solve some local script issues.

That might be an option, but from their docs:

Warning

Electron’s webview tag is based on Chromium’s webview, which is undergoing dramatic architectural changes. This impacts the stability of webviews, including rendering, navigation, and event routing. We currently recommend to not use the webview tag and to consider alternatives, like iframe, Electron’s BrowserView, or an architecture that avoids embedded content altogether.

OK that leaves Jupiter Notebook as another option to run scripts if you can include Jypiter in an IFrame that is.