Ok, there seems to be something these days - found via the above stackoverflow post:
https://bl.ocks.org/-/about
Bl.ocks (pronounced “Blocks”) is a simple viewer for sharing code examples hosted on GitHub Gist. For example, if your Gist URL is:
https://gist.github.com/mbostock/1353700
Replace “gist.github.com” with “bl.ocks.org” in the URL to view it:
https://bl.ocks.org/mbostock/1353700
Note that you MUST have an index.html (or README.md) in your gist; otherwise bl.ocks will not. I just added a href local links to my other .html pages in the gist, and that seems to work.
Note that by default, bl.ocks seems to basically render index.html, and then render all other files as source code. But, say you open:
... then there is an "Open" link right below, and that opens up:
... (which in this case, is an empty page); and then you can open up direct via link to a given file:
( this particular example won't work/render, because of "The resource from “https://raw.githubusercontent.com/d3/d3/v1.2.1/d3.js” was blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff)" - apparently a MIME or redirect problem; however via view source you can see the right HTML ).
Finally, I've noticed, if you use a http://example.com/somelib/somelib.js
in your html code in a gist, and you access via https://bl.ocks.org
-> then the URL will be rewritten as https://example.com/somelib/somelib.js
- which could be a problem, if that example.com site does not serve over HTTPS. Thankfully, you can also call via http://bl.ocks.org
- and then unencrypted http URLs don't seem to be rewritten, and the page should work.
Still would be nice to have a definitive answer for Github Pages in this context...