-
Notifications
You must be signed in to change notification settings - Fork 689
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
Added option to disable baseUrl in pathname #418
base: master
Are you sure you want to change the base?
Conversation
Reference issue #234. |
Hey @jamrizzi, I don't totally understand the issue you're fixing. Can you give some code examples of the undesirable behavior? |
I was hoping for a small code example. I think what you are saying is that you expect to be able to do: page.base('/some/base');
page('/foo', function(){
}); And then have links like: <a href="/foo">Hello world</a> Is this correct? If so I agree that this shouldn't be needed. |
Correct |
There are cases where it is needed. Specifically, websites where the root is not directly on a domain, but several directories in. |
For example, github pages |
I think it's terrible to force explicitly mentioning the baseUrl in every href. I propose adding the option
baseUrlInPathname
. I set its default value totrue
, so it won't break anything.