Skip to content
Wrenform

Contact forms / Jekyll

Jekyll contact form without a plugin

One contact.html page with a plain HTML form. No plugin, no JavaScript, and it works on GitHub Pages.

Why Jekyll needs a form backend

Jekyll builds your site into static files, and GitHub Pages serves them as they are. There is no server to receive a contact form, and GitHub Pages only runs a short list of approved plugins, none of which sends email.

With Wrenform the form's action points at your endpoint, and the visitor's browser posts straight to us. We store each submission, filter spam and email your recipients. Your site stays a plain Jekyll build, with nothing to add to the Gemfile.

The prompt

Replace YOUR_FORM_ID with the ID of your form, and example.com with your site. The hidden _redirect field sends the visitor to your own thank-you page after sending.

---
layout: default
title: Contact
permalink: /contact/
---
<form action="https://wrenform.com/f/YOUR_FORM_ID" method="POST">
  <label>Name <input type="text" name="name" autocomplete="name" required></label>
  <label>Email <input type="email" name="email" autocomplete="email" required></label>
  <label>Message <textarea name="message" required></textarea></label>
  <input type="hidden" name="_redirect" value="https://example.com/thanks/">
  <input type="text" name="_honey" style="display:none" tabindex="-1" autocomplete="off">
  <button type="submit">Send</button>
</form>

Steps

  1. Create a form (free) and copy its form ID. No account yet? Ask your AI tool to create a quick form with framework: "jekyll": one request returns your endpoint and a ready snippet. Click Confirm in the email from Wrenform, and messages start arriving.
  2. Save the snippet as contact.html at the root of your site and replace YOUR_FORM_ID.
  3. Add a thanks.html page with permalink: /thanks/, and set _redirect to its full URL.
  4. Push or deploy, and add your site to Allowed origins.

Spam handling

Spam filtering is on for every form, with no CAPTCHA: a hidden honeypot field, a timing check, rate limits per visitor, and a content score for links, keywords and gibberish. Spam goes to a separate tab and is never emailed. See how spam filtering works.

Where messages go: every real submission is emailed to your recipients and kept in the dashboard inbox. On Pro and Agency plans, a webhook can also send each one to your own server.

Deployment notes

  • Netlify. Deploy as usual. Netlify only processes forms that carry its own netlify or data-netlify attribute, so it leaves this form alone and the browser posts it to Wrenform. Add your netlify.app address and your custom domain to Allowed origins.
  • Vercel. Nothing to configure. The Jekyll build stays static; you don't need a serverless function for the form. Add your production domain to Allowed origins. Preview deployments get their own addresses, so leave the list empty while you test them, or add each one.
  • Cloudflare Pages. No Pages Function needed. Add your pages.dev address and your custom domain to Allowed origins. If you set a Content-Security-Policy header, add form-action https://wrenform.com.
  • GitHub Pages. GitHub Pages serves static files only, which is all this form needs. Add https://<user>.github.io (or your custom domain) to Allowed origins. The origin is the host only, without the repository path.

Reuse the form with an include

Want the form on more than one page? Move it to _includes/contact-form.html, set wrenform_id: YOUR_FORM_ID once in _config.yml, and add {% include contact-form.html %} wherever it should appear. The Jekyll guide has the include, and GitHub Pages covers project-site addresses.

{% comment %} _includes/contact-form.html
   In _config.yml:  wrenform_id: YOUR_FORM_ID {% endcomment %}
<form action="https://wrenform.com/f/{{ site.wrenform_id }}" method="POST">
  <label>Name <input type="text" name="name" autocomplete="name" required></label>
  <label>Email <input type="email" name="email" autocomplete="email" required></label>
  <label>Message <textarea name="message" required></textarea></label>
  <input type="text" name="_honey" style="display:none" tabindex="-1" autocomplete="off">
  <button type="submit">Send</button>
</form>

FAQ

Does it work on GitHub Pages?
Yes. The form is plain HTML and needs no plugin, so GitHub Pages builds it like any other page. Add https://<user>.github.io or your custom domain to allowed origins.
Do I need a Jekyll plugin or JavaScript?
No. A form with action and method POST works on its own. The optional helper script only adds a timing check.
Does jekyll serve work for testing?
Yes. Leave allowed origins empty while you test, or add http://localhost:4000.

Next steps