Permalinks with Live Edit?

Hi, when working with pure HTML and CSS (no JS) and relying on Live Edit, it's not possible to use permalinks - /link would not render /link.html

Is it possible to solve this somehow? Would be useful for example if we deploy to Netlify, I don't want to have /link.html like links.

Thanks

11 comments
Comment actions Permalink

Not sure I follow you... Tags rendering has no relation to Live Edit. What do your links look like? please provide code snippets/files

0
Comment actions Permalink

It's not about Live Edit then, it's about the built-in web server that always serves static assets from http://localhost:63342/<project name> and thus doesn't support absolute URLs starting with slash, like "/path/to/foo": such slashes (as well as <base href="/"> tag) tell the browser to resolve URLs from the web server root, and no resources can be loaded from http://localhost:63342 - thus 404 errors are thrown. Only URLs relative to current HTML files or CDN links can be served.

There is unfortunately no way to set up the built-in web server to serve files from the root; if using absolute URLs is mandatory, I can only suggest using a different web server for hosting your files

1
Comment actions Permalink

What about http://localhost:63342/project/foo rendering http://localhost:63342/project/foo.html ?

0
Comment actions Permalink

please read my comment above - there is no way to make the built-in web server serve files from its root; http://localhost:63342/foo.html will result in 404 error

0
Comment actions Permalink

Sorry, it was not formatted well, I updated the comment - not from root, but from project folder

0
Comment actions Permalink

http://localhost:63342/project/foo.html should work (if foo.html is located in the project root or resource root folder)

 

0
Comment actions Permalink

Elena, you are missing the point the whole time. The whole idea and my question was if it's possible to open it without ".html" extension... Anyway, my conclusion is that it's not possible..

0
Comment actions Permalink

Yes, it's not possible

0
Comment actions Permalink

Sorry to jump on this but can't figure out how to do a simple mapping for a similar case.

On projects where webserver files are located in say /projectfolder/www/ how can I force livedit to show paths from there, this is: 

http://localhost:63342/foo.html instead of http://localhost:63342/www/foo.html

0
Comment actions Permalink

No way, the built-in web server is not configurable, you can't change the URLs to make files served from the server root

0

Please sign in to leave a comment.