Skip to content
← Back to Community
How to choose which file displays when embedding?
Profile icon
rrcobb

I have a repl with a Markdown readme - I want the readme to display when I embed the repl, instead of the default file.

Is there a way to configure this?

Voters
Profile icon
iladrin
Profile icon
ANIL25
Profile icon
OlegAvdeev2
Profile icon
ArcPG
Profile icon
rrcobb
Comments
hotnewtop
Profile icon
Nashorn1

How can i configure my repl.it embed to open an html file other than index.html? I have to demo multiple different html demos and want to share a diff repl

Profile icon
SixBeeps

Repl.it will always run the main file, so how I'd do it is in your HTML page you want to embed the Repl into, put the readme there instead and make a new embed to the rest of the code whenever they're done reading it.

Profile icon
rrcobb

@SixBeeps
thanks for the idea!

It's actally a node.js repl, so it doesn't have an html page. I'm also using the .replit config file to decide what happens when I click the 'Run' button, and now that's the file that shows up when I embed the repl or refresh.

Profile icon
SixBeeps

@rrcobb
Oh, interesting.
There's a library written in Node.js called Marked that parses markdown into the resulting webpage, so maybe give that a try?

Profile icon
rrcobb

@SixBeeps
I don't think that'll work for me - I mostly want to be able to configure which file shows up by default in the embed (instead of the .replit file)

Profile icon
SixBeeps

@rrcobb
Oh yeah no that's not possible.