Embedding multiple pages (for Medium, Observable, blogs, etc.)


Use case

Competing services like CodePen, Repl.it, and Code Sandbox all support embedding smaller, specific pages of a single project type. This is useful when trying to embed a single project (e.g. my-tutorial.glitc‍h.‍me) into a Medium or blog post (e.g. “How To Use My-New-Thing: Step 1/2/3/4”) with explanation between steps. Glitch projects can be webpages but the things you might want to embed from a single Glitch project are numerous, they may be many pages in a static site or many Node endpoint examples—the Embedly & iframe integration points should reflect that.

Feature suggestion

Is there a way to embed sub-pages of a project? The Embedly integration only accepts glitch.com/* , and if you specify a ?path=public/other-page.html the code panel changes to other-page.html but the displayed page is always index.html . Would it be possible for the Glitch team to change the app preview to read from the path query param, or (perhaps because that would break previous embeds) add another query param that allows us to change the app preview? Perhaps appPreview ?

It’d be useful to be able to use https://glitch.com/edit/#!/caff?path=public/other-page.html?appPreview=public/other-page.html in order to embed a new example without making a whole new Glitch project.

(Note, I scraped a previous suggestion from here into its own thread with updated suggestions o avoid necroposting)


Use an iframe


I can do that on a custom site, the problem is embedding multiple views of the same site on Medium & other Embedly hosts.


Any update on this @pketh? I know you were looking into updating the embedding code a couple months back (see linked post below).