Skip to content
Lazyform

Contact form for Jekyll

Add a contact form to your Jekyll or GitHub Pages site with one include. No plugins, no server: messages go straight to your email, Telegram or Slack.

Free plan: 250 submissions a month, forever.

Why a form backend for Jekyll

Jekyll sites, especially ones on GitHub Pages, are pure static files. GitHub Pages can't run server code, so a contact form has nowhere to post.

Lazyform gives the form somewhere to go. You add one include, and every message is checked for spam, saved in your dashboard and delivered to you.

A working contact form

Add your key and site URL to _config.yml. Replace YOUR_ACCESS_KEY with your key from /login.

_config.yml
url: "https://example.com"
lazyform_key: "YOUR_ACCESS_KEY"

Create the include:

_includes/contact-form.html
<form action="https://lazyform-api.xvelopers.com/submit" method="POST">
  <input type="hidden" name="access_key" value="{{ site.lazyform_key }}">
  <input type="hidden" name="redirect" value="{{ '/thanks/' | absolute_url }}">
  <input type="hidden" name="subject" value="New message from {{ site.title }}">

  <label for="name">Name</label>
  <input id="name" name="name" required>

  <label for="email">Email</label>
  <input id="email" name="email" type="email" required>

  <label for="message">Message</label>
  <textarea id="message" name="message" rows="6" required></textarea>

  <input type="checkbox" name="botcheck" class="hidden" style="display:none">
  <button type="submit">Send</button>
</form>

Then drop it into any page or post:

contact.md
---
layout: page
title: Contact
permalink: /contact/
---

{% include contact-form.html %}

Add a thanks.md page with permalink: /thanks/ so visitors land somewhere friendly after sending.

Get submissions where you want them

Every submission is emailed to you. Turn on Telegram, Slack, Discord or WhatsApp alerts, or send submissions to Google Sheets, Notion or Airtable. See all integrations.

Full guide

The Jekyll guide covers several forms on one site, sending without a page reload, file uploads and captcha.

Questions

Does this work on GitHub Pages?

Yes. It uses no plugins, only a standard include and a value from _config.yml, so it builds on GitHub Pages as is.

Do I need a Jekyll plugin?

No. The form is plain HTML that posts to Lazyform. Jekyll only fills in your key and the thank-you URL when it builds the site.

Why does the thank-you URL use absolute_url?

Lazyform redirects the visitor to the exact URL you send, so it must include your domain. absolute_url builds it from the url setting in _config.yml.