Open clayrisser opened 7 years ago
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.