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
- 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. - Save the snippet as
contact.htmlat the root of your site and replaceYOUR_FORM_ID. - Add a
thanks.htmlpage withpermalink: /thanks/, and set_redirectto its full URL. - 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
netlifyordata-netlifyattribute, so it leaves this form alone and the browser posts it to Wrenform. Add yournetlify.appaddress 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.devaddress and your custom domain to Allowed origins. If you set a Content-Security-Policy header, addform-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?
Do I need a Jekyll plugin or JavaScript?
Does jekyll serve work for testing?
Next steps
- The full Jekyll guide: every option, testing, and common problems.
- Contact form for Hugo without a server
- HTML contact form without a backend
- Pricing: free for 250 submissions a month.