Ask coding questions

← Back to all posts
.replit with websites
SixBeeps (5353)

I'm trying to import a Github repo based on HTML, CSS, and JS. The problem I'm having is that, because of how importing repos works, I don't see a way to configure the run config in the .replit file for "recompiling" the pages. Has this been done before?

Answered by Vandesm14 (2752) [earned 5 cycles]
View Answer
Vandesm14 (2752)

The .replit file does not work on html repls.

SixBeeps (5353)

@Vandesm14 Then is it possible to import web repos?

Vandesm14 (2752)

@niorg2606 I don't know. When you import, is it a bash repl or an html repl? If it's a bash repl, then it might be broken. If not, just remove the .replit file from the html repl.

Vandesm14 (2752)

@niorg2606 does not currently support the importing of HTML repos. I suggest either reporting the feature request to or sending the bug to

stringycheese (1)

Maybe just only put the "language" & not "run" in the .replit, and it should automatically open the index.html?

EDIT: That didn't work
SixBeeps (5353)

@stringycheese Two years have passed since I originally posted this. The Node + Express agents are holding me as a prisoner in their HQ in California, and I can no longer remember the daylight. I am surrounded by broken sockets and unused NPM packages from projects that go unfinished. My only solace in this desolate atmosphere is the occasional HTTP 200 OK which breathes a new life into me.

stringycheese (1)

@SixBeeps XD. Yet the question has never truly been answered and there is still no way to import HTML repos properly.

SixBeeps (5353)

@stringycheese Just set up a web server in the Repl and route it yourself.

stringycheese (1)

Good idea @SixBeeps I'm gonna try that thanks!


@SixBeeps @DynamicSquid for ur question support i understood the problem and thx for posting

AdCharity (1326)

Ok I don't understand the git hub run feature fully myself, and this probably not the documented way, but you could:

1) import the repo
2) select the correct language for and html repl
3) delete the replit file
4) assuming there's an index.html file, it should run perfectly fine

Now is this the correct way? Probably not. But in the mean time, it should work with reasonable effectiveness.

SixBeeps (5353)

@AdCharity See, I tried this, and it looks like when I add the .replit file, every single file and folder gets deleted. This is most likely a bug, but I just want to make sure, has this method worked for you?

AdCharity (1326)

@niorg2606 kk 1) if its not added don't add it lmao 2) I've only tried this on node.js repls with a static webpage projected to the client with express

kkwoo (0)

@AdCharity thanks for your post. Observation #4 made the difference. Let me contribute a little:

My findings are in line with AdCharity's observations and findings. Here's what I did:

That allowed me to achieve my goal of playing the Orbit demo and tinkering with it. It's not perfect because I now need to visit my hacked up /index.html and click through the HREF to see any changes I've made to the Orbit demo. A potential next step is to clone example/game-orbit/index.html into /index.html and change the relative URLs accordingly.