Protect sensitive info (emails/phone numbers) on your Jekyll site from scrapers and bots.
jekyll-js-protect
in your Gemfile
like sogem 'jekyll-js-protect'
bundle install
There are 3 Liquid Filters that this plugin exposes, string_protect
, email_protect
and tel_protect
.
email_protect
and tel_protect
will add mailto:
and tel:
links resepectively.
For other info (or if you don't want your email/number to be clickable) use the string_protect
tag.
The markup below
Bots can't read this: {{'I like pineapples' | string_protect}}
My email address is {{'[email protected]' | email_protect}}
You can call me at {{'9999999999' | tel_protect}}
Renders:
<noscript>
fallback is provided for when JS is disabled.