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

Remove conditional assignment from Document URL #2575

Merged
merged 4 commits into from
Jul 10, 2014

Conversation

alfredxing
Copy link
Member

The conditional assignment was making results from url quite outdated, causing #2557.

This PR provides a fix for the issue as well as a test covering document permalinks.

@@ -127,7 +127,7 @@ def permalink
#
# Returns the computed URL for the document.
def url
@url ||= URL.new({
@url = URL.new({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the permalink method not take from data?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@parkr It does, but when url is first called at the beginning of read, data is not yet initialized, so the URL ends up not taking into consideration the permalink at all.

@iloveip
Copy link

iloveip commented Jul 10, 2014

Can you please include this PR in v. 2.1.1? I would really like to be able to set custom permalinks for documents inside collection, as I can not get the navigation to work the right way otherwise (see #2560 ).

@parkr parkr merged commit 36c5017 into jekyll:master Jul 10, 2014
parkr added a commit that referenced this pull request Jul 10, 2014
@alfredxing alfredxing deleted the test-document-permalink branch July 10, 2014 16:26
@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants