Closed SukkaW closed 5 years ago
Hello @SukkaW 👋
Do you know how this is usually used?
Like so? <img src="<%- gravatar("someone@nowhere.dev") %>">
If it is used like that we do not actually need to specify the protocol. https://
can become just //
.
For reference:
https://github.com/hexojs/hexo/blob/master/lib/plugins/helper/gravatar.js#L15
From the docs and the code I believe <img src="<%- gravatar("someone@nowhere.dev") %>">
is the use case.
The //
is better not just because it is shorter, as for people who still stick to ****y HTTP, just a simple gravatar loading using HTTPS is not helpful to the safety and security. The //
would cause issue only if the page is under file://
.
And whatever, at least the document of gravatar helper need updated. I have already forked the site repo and ready for the PR.
This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
For question
From pull #1561 Hexo gravatar helper start to using
https
instead ofhttp://
.Using HTTPS is definitely much safer, but it is certain that there are still some blog using HTTP. In this case using '//' might be more suitable.
Besides that, the documents related to gravatar helper is outdated (and still showing
http://www.gravatar.com
).I can open new pr if hexo team thinks it is necessary.