Feature request: cloak email.
Take an email address like [email protected]. If that was to appear on one of your posts/pages, it could easily be ‘scraped’ or ‘harvested’ automatically to add that email address to a spam list of some sort. Cloaking is all about making that harder to do.
Joomla!, WordPress and other popular CMS provides feature named "cloak email". It cause replace any <a href="mailto:[email protected]">mailto:[email protected]</a> to uglified JavaScript which generate original mailto link after webpage was loaded in browser.
Proposal: implement build-in shortcode for it. It must be implemented in Go because uglify function is should not be trivial.
Proposal: this should have fallback option (html+css) in case js in turned off (or fails to load for some reason). Something like this: https://stackoverflow.com/questions/21421948/protect-e-mail-address-with-css-only
Another option is to use an inline base64 data encoded image, if it doesn't have to be linked.
Email address should be readable by people with disables.
I've started working on this feature. I'm done with the html+css variant but it is quite limited, text not selectable, no link and I assume not readable in a screen reader. I think I'll be done with a js variant the next couple of days.
@dzwiedziu-nkg I've submitted a PR for this. Let me know if you think the obfuscation is to simplistic.
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
This would still be a useful feature. What about integrating the pull request https://github.com/gohugoio/hugo/pull/3935?
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
I still think this would be very useful :-)
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
Still useful IMHO. Suggesting integration of PR #3935.
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
Still a good way to minimize spam on a Hugo site.
Just published the cloakemail shortcode as a Hugo component: https://github.com/martignoni/hugo-cloak-email. Credits goes to @danieka for the code.
This can be closed as far as I'm concerned.
@martignoni Thank you. You inspired me to a theme components section to the Awesome Hugo List: https://github.com/budparr/awesome-hugo
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
Most helpful comment
Proposal: this should have fallback option (html+css) in case js in turned off (or fails to load for some reason). Something like this: https://stackoverflow.com/questions/21421948/protect-e-mail-address-with-css-only