How to Make Your URL's Look Good (.../index.html to .../index)
For this, my example URL is gonna be website.com/branch, so beware.
I am gonna teach you how to make your URL's look good.
Every time you create a new repl, you have a starter folder, index.html
, which you can't delete. In the head, put this code:
<script src="PATH/TO/FILE" type="text/html"></script>
Then type whatever code in. It will not have the automated suggestions or even the colors,
<h1>Hello World</h1> <p>Hello!!!</p>
but it will work.
Upvote if you liked it!
The industry standard way is to just use a server framework like Node or Django but this is interesting, I'll have to mess with it.
I never knew that, how cool! @SixBeeps
Hey! Can you explain how to use it?
<head><script type="text/html"> <h1>Hello, World!</h1> </script> <!-- You don't have to put defer. --> <script defer src="folder/branch"></script></head>
file.html:5 GET https://elm-test.battledash2.repl.co/folder/branch net::ERR_ABORTED 404
Let me update my post. I did something wrong. @Battledash2
Uhh still doesn't do anything..
index.html
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>repl.it</title> <link href="style.css" rel="stylesheet" type="text/css" /> <script src="main.js" type="text/html"></script> </head> <body> <script src="script.js"></script> </body> </html>
main.js
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> asdfs </body> </html>
That's because it's .js not .html @Battledash2
i tried that first @EitanAlperstein
You should have a file with no extension and then add a script tag from index.html with src to your file path and type to text/html. @Battledash2
i dont understand
can you make a repl with how to do it?
Here's My Current Code/Files @EitanAlperstein
im gonna try to do that but i dont fully understand @EitanAlperstein
still didnt work @Battledash2
Just a sec here. I'm gonna make a repl to show you. @Battledash2
thx :) @Battledash2
Go to this link: @Battledash2
tbh that's cool. you can make js automatically redirect you & stuff. And you should probably make a copy with .html for 2 rsns:
- The person might put .html
- Syntax [email protected]
Sorry it took some much time to respond, repl is loading lazily. I definitely agree. Also, would you like to join my team where we make coding languages? https://repl.it/teams/join/zzdmvixfrdbulxlpungqqnaeictpczpm-TeamCL press the link ONLY if you want to join. @Battledash2
uh sure @EitanAlperstein
i only do Web Development tho @EitanAlperstein
sure you want me to join? @EitanAlperstein
Yeah you can work on our website with me. If you want. @Battledash2
If you want to. @Battledash2
It would be great. @Battledash2
ok ill join @EitanAlperstein
Just press the link. @Battledash2
You aswell end your dumb little project aye? I QUIT @EitanAlperstein
They definitely don't swear and don't call me five year olds. By the way I removed everything I added to the thing, I'll give it back if they get kicked or something which I doubt is happening. IF YOU USE ANY OF MY CODES..... Say hello to Jail and BANS :) @EitanAlperstein
@Battledash2 You’re one to talk
I'll give it back
You do know that Repl History is a thing right? @Battledash2
He deleted the files, not the code. @SixBeeps
You can't retrieve files, as I know it. @SixBeeps
@EitanAlperstein You can, just re-create the file and look at its history
Turns out he deleted a trash file! :D @SixBeeps
@EitanAlperstein Just so you know, Battledash2 has been banned.
really??!!?!?!? who reported him? @CodeLongAndPros
@EitanAlperstein @MocaCDeveloper, but I did the ban
thanks. @CodeLongAndPros
@EitanAlperstein Yeah, no problem, and the team should be looking into an IP ban.
What’s that? @CodeLongAndPros
@EitanAlperstein Even if you make a new account, you still won't be able to bypass the ban unless you use another computer.
@SixBeeps Or a vpn
What is a vpn? @CodeLongAndPros
@Battledash2 I have not thought about such a solution to the problem before, thank you
@Battledash2 Thus, the link looks better than originally. It seems that the direct link on the site looks a little raw and not quite appropriate and not as good as just text with an active link already inside. I like services like https://transformagency.com/ because their promotion is not only about leaving an active link, but they comprehensively approach advertising and each project individually. This requires a professional approach, and apparently, now many services work like this because they realized that customers need quality and not quantity
You don't even need the
type="text/html"
. Repl.it automatically knows what language it is when you add an html code.