-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate the use of <base> instead of linkPrefix #161
Comments
Wow... I've never heard of actually. Yeah, this looks perfect. So it looks like we could keep things basically as they are now except when someone builds with It seems like browser support is near 100%. Is there any downsides to using this technique? |
Only downside that I understand is that it needs an absolute path, so |
But you should only prefix links for production? I can't think of any other
|
Yes, same use of
when you want to prefix all relative links with Only needed for production (no need for localhost, since Gatsby is "normalizing" the url) AND root path is not |
After some googling, it looks like the tag has some serious downsides...
Leaning towards closing this... thoughts @gesposito? |
Looks like the only problem we might care about (other two are old issues) is the behaviour with #anchor links. |
Yeah, breaking #anchor links is my main concern as they're often used on static sites. |
I think
linkPrefix
might be some (unnecessary) overhead for newcomers, we could use:https://developer.mozilla.org/en/docs/Web/HTML/Element/base
http://webdesign.tutsplus.com/articles/quick-tip-set-relative-urls-with-the-base-tag--cms-21399
The text was updated successfully, but these errors were encountered: