staticman-recaptcha

👮‍♂️ Demo site using Staticman + reCAPTCHA

Stars
10

Staticman + reCAPTCHA

This is a demo Jekyll site showing how to integrate Staticman with Google's reCAPTCHA.

Getting started

After following the steps to install Staticman, you need to integrate reCAPTCHA.

  1. Sign up to reCAPTCHA. You'll be assigned a Site key and Secret.

  2. Encrypt the secret using Staticman's encryption endpoint:

  https://api.staticman.net/v2/encrypt/YOUR-SECRET  

  1. Take the site key and the encrypted secret and add a reCAPTCHA block to your Staticman config file:
reCaptcha:
  enabled: true
  siteKey: "YOUR-SITE-KEY"
  secret: "YOUR-ENCRYPTED-SECRET"
  1. Add the reCAPTCHA credentials to your form:
<input type="hidden" name="options[reCaptcha][siteKey]" value="YOUR-SITE-KEY">
<input type="hidden" name="options[reCaptcha][secret]" value="YOUR-ENCRYPTED-SECRET">
  1. Add the reCAPTCHA script and DOM element
<div class="g-recaptcha" data-sitekey="YOUR-SITE-KEY"></div>
<script src='https://www.google.com/recaptcha/api.js'></script>

Reporting issues

Please open an issue in the Staticman repository.