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

Wraps image path update in config option #537

Merged
merged 2 commits into from
Oct 5, 2018

Conversation

jonbullock
Copy link
Member

Relates to #535 and #459

@jonbullock jonbullock added this to the v2.6.2 milestone Sep 28, 2018
@jonbullock jonbullock self-assigned this Sep 28, 2018
@coveralls
Copy link

coveralls commented Sep 28, 2018

Coverage Status

Coverage decreased (-0.1%) to 80.713% when pulling e3f0f5c on jonbullock:fix/image-path-update into 8b66bfe on jbake-org:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.5%) to 80.344% when pulling a108a6f on jonbullock:fix/image-path-update into 8b66bfe on jbake-org:master.

Copy link
Member

@manikmagar manikmagar left a comment

Choose a reason for hiding this comment

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

Changes looks good to me. This will help those who do not wish to modify image urls. Also, backward compatible for those who are using it. Thanks!

@@ -283,10 +283,15 @@
boolean getUriWithoutExtension();

/**
* @return Flag indicating if image paths should be prepended with {@link #getSiteHost()} value
* @return Flag indicating if image paths should be prepended with {@link #getSiteHost()} value - see {@link #getImgPathUpdate()}
Copy link
Contributor

Choose a reason for hiding this comment

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

For me this description is not clear enough. What different effects do I get with the different combinations of boolean values for img.path.prepend.host and img.path.update?

Copy link
Member

Choose a reason for hiding this comment

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

img.path.prepend.host will have no effect when img.path.update is set to false.

When img.path.update is true, image paths will be modified to prepend with context.rootpath value (see #459). Optionally, the site.host value can also be prepended to modified image path. This site.host modification is controlled by img.path.prepend.host.

Hope that helps!

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

The rootpath variable is calculated for each source content file, which is why it isn't in the config classes, however that variable isn't used in this implementation anymore.

I'll update the javadoc though to make it clearer though. Thanks @kwin and @manikmagar 👍

@jonbullock
Copy link
Member Author

Anyone else have any issue with this being merged in?

@jonbullock jonbullock merged commit 64f6a4a into jbake-org:master Oct 5, 2018
@jonbullock jonbullock deleted the fix/image-path-update branch October 5, 2018 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants