-
Notifications
You must be signed in to change notification settings - Fork 12
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
use url instead of path #13
base: master
Are you sure you want to change the base?
Conversation
Thank you! I'll review this shortly. |
Could you please explain more clearly why you are making these changes? |
@@ -21,7 +21,7 @@ def initialize(app, options_hash = {}, &block) | |||
def breadcrumbs(page, separator: @separator, wrapper: @wrapper) | |||
hierarchy = [page] | |||
hierarchy.unshift hierarchy.first.parent while hierarchy.first.parent | |||
hierarchy.collect {|page| wrap link_to(page.data.title, "/#{page.path}"), wrapper: wrapper }.join(h separator) | |||
hierarchy.collect { |x| wrap link_to(x.data.title, x.url), wrapper: wrapper }.join(h separator) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you changing the name of the block argument from page
to x
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably because page
shadows the first page
declared in the signature of the method. Let's call it p
instead of x
maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To keep using the path instead of switching to the URL I'd do something like URI(page.url).path
or URI(x.url).path
. If that's alright I'll do a new pull request with an explanation of where the old way fails for me.
url handles clean url properly.
We should use url instead of path to be work with
activate :directory_indexes
.