-
Notifications
You must be signed in to change notification settings - Fork 25.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Use relative_url and absolute_url where possible #2387
Conversation
Drops the `contains "://"` check, adopt Jekyll 3.7 Ref: mmistakes#2385 (comment)
67f5d7b
to
f7f50ac
Compare
This issue has been automatically marked as stale because it has not had recent activity. If this is a bug and you can still reproduce this error on the If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial. This issue will automatically be closed in 7 days if no further activity occurs. Thank you for all your contributions. |
Any ideas? @mmistakes |
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.
Minor changes in _includes/author-profile.html
as noted and I think this is good to merge in.
@mmistakes I assume you received notifications for the last commit? |
Nice work on this one, everything looks good to me! |
* Use relative_url and absolute_url where possible Drops the `contains "://"` check, adopt Jekyll 3.7 Ref: mmistakes#2385 (comment) * One more unneeded {% assign %} * Remove one more assign as noted by mmistakes * Consolidate 4 more captures * Consolidate an extra assign on "active" class
* Use relative_url and absolute_url where possible Drops the `contains "://"` check, adopt Jekyll 3.7 Ref: mmistakes#2385 (comment) * One more unneeded {% assign %} * Remove one more assign as noted by mmistakes * Consolidate 4 more captures * Consolidate an extra assign on "active" class
* Use relative_url and absolute_url where possible Drops the `contains "://"` check, adopt Jekyll 3.7 Ref: mmistakes#2385 (comment) * One more unneeded {% assign %} * Remove one more assign as noted by mmistakes * Consolidate 4 more captures * Consolidate an extra assign on "active" class
* Use relative_url and absolute_url where possible Drops the `contains "://"` check, adopt Jekyll 3.7 Ref: mmistakes#2385 (comment) * One more unneeded {% assign %} * Remove one more assign as noted by mmistakes * Consolidate 4 more captures * Consolidate an extra assign on "active" class
This is an enhancement or feature.
Summary
Since Jekyll 3.7.0 the
relative_url
filter does nothing when given an absolute URL, which eliminates the need to manually check forurl contains "://"
. This saves a lot of effort when coding.A similar behavior for the
absolute_url
filter had already been introduced earlier in jekyll/jekyll#5789 and was released with Jekyll 3.5.I ran both
grep -nrF 'contains "://"'
andgrep -nrF "contains '://'"
(single- vs. double-quotes) and reviewed every single occurrence of them, and refactored wherever possible / makes sense.Jekyll 3.6 would no longer be compatible with this theme after merging this PR.
Context
#2385 (comment)