Set page dir so link tag works with pagination pages #226
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there, I've not opened a new issue for this because it's essentially the same as the closed issue #104 - let me know if you'd like me to create a new issue for this PR.
To recap #104, currently the
linktag doesn't work for paginated pages that aren't in the root directory. This is because when the paginated page is copied,page.dirisn't set. Thenpage.relative_path(which is what thelinktag looks for) is in turn set by joining dir and name.In this PR, I'm setting
@dirin theset_urlmethod after@urlis set because I'm using the inheriteddirmethod from the JekyllPageclass which uses the url to get dir.I'm aware that this change means the
set_urlmethod doesn't just set the url. There are a few options:set_url_dirPaginationPagemethod calledset_dirto be called afterset_urlis called inpaginationModel.rb, or