No release in over a year
Protect sensitive details from bots in your Jekyll site
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

 Project Readme

🧧 jekyll-js-protect

Protect sensitive info (emails/phone numbers) on your Jekyll site from scrapers and bots.

🔴 Install

  1. Add jekyll-js-protect in your Gemfile like so
gem 'jekyll-js-protect'
  1. Run bundle install

♦️ Usage

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 {{'dont@spam.me' | email_protect}}

You can call me at {{'9999999999' | tel_protect}}

Renders:

image

📕 How it works

  • The input to the Filter is encoded in Base64 then prefixed with a code
  • A Jekyll Hook adds a tiny JS file to your pages
  • When the JS file loads it decodes the encoded info
  • Since webcrawlers used for collecting emails do not typically have a JS stack it protects against such bots

🧰 Misc

  • A <noscript> fallback is provided for when JS is disabled.
image
  • It is assumed that anyone who chooses to disable JS on their browser knows how to decode Base64 strings