Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

clayrisser
Copy link

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 to true, so it won't break anything.

@clayrisser
Copy link
Author

Reference issue #234.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 89.209% when pulling 0b54133 on jamrizzi:master into 1034c8c on visionmedia:master.

@matthewp
Copy link
Collaborator

Hey @jamrizzi, I don't totally understand the issue you're fixing. Can you give some code examples of the undesirable behavior?

@clayrisser
Copy link
Author

@matthewp
Copy link
Collaborator

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.

@clayrisser
Copy link
Author

Correct

@clayrisser
Copy link
Author

There are cases where it is needed. Specifically, websites where the root is not directly on a domain, but several directories in.

@clayrisser
Copy link
Author

For example, github pages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants