From 486c70c2163ca8cd2fb95eceb02f7d13000b33a6 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Tue, 30 Jun 2020 19:53:06 +0100 Subject: [PATCH] feat: add Netlify form options to Contact widget Help reduce spam --- exampleSite/content/home/contact.md | 4 ++++ layouts/partials/widgets/contact.html | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/exampleSite/content/home/contact.md b/exampleSite/content/home/contact.md index 6459d09f..25188e2b 100644 --- a/exampleSite/content/home/contact.md +++ b/exampleSite/content/home/contact.md @@ -16,5 +16,9 @@ autolink = true # 1: Netlify (requires that the site is hosted by Netlify) # 2: formspree.io email_form = 2 + +# Netlify form settings. +[netlify] + captcha = false # Enable CAPTCHA challenge to reduce spam? +++ diff --git a/layouts/partials/widgets/contact.html b/layouts/partials/widgets/contact.html index ddc46091..d8c6452e 100644 --- a/layouts/partials/widgets/contact.html +++ b/layouts/partials/widgets/contact.html @@ -25,7 +25,7 @@ {{end}}
-
+
@@ -38,6 +38,14 @@
+ {{ if eq $page.Params.email_form 1 }} +
+ +
+ {{ end }} + {{ if $page.Params.netlify.captcha }} +
+ {{ end }}