Previewing STL 3d files

Hello,
I saw that github is capable of rendering .stl code and it’s super nice (example here).
I noticed that the preview is inside an <iframe/> so the logic to get it done might not be that straightforward. I was wondering if it’s just a matter of markdown rendering and hence something that could be done in jekyll, or if it’s something out of the scope of a static site generator.
Thanks

One option is to use a Javascript library to render the .stl file on the fly. Searching around turned up an example:

Thanks, I ended up doing something similar. Including Online3DViewer in my jekyll setup was super easy

The answer is yes, both Github and Jekyll support .stl file render.
You can understand deeply by read this article Setting a Markdown processor for your GitHub Pages site using Jekyll - GitHub Docs

First, Github use their Markdown processor call GitHub Flavored Markdown, also known as GFM.

Everything out it work last version support in here GitHub - github/cmark-gfm: GitHub's fork of cmark, a CommonMark parsing and rendering library and program in C

Okay, we go back to Jekyll, By default, Jekyll uses the GitHub Flavored Markdown (GFM) processor for Kramdown. (Specifying input: GFM is fine, but redundant.)

But, Github has clearly to us that
You can use GitHub Flavored Markdown with either processor, but only our GFM processor will always match the results you see on GitHub.

So, if you want to see .stl on your markdown site.

I suggest you to do this,
Find the line that starts with markdown: and change the value kramdown to GFM .