How to add contact form to Jekyll

What is Jekyll?

Ruby-based static site generator and the engine behind GitHub Pages. Whether you're building a personal blog, documentation site or portfolio, Jekyll handles the heavy lifting of converting your content into clean, performant HTML.

Why add contact form to your Jekyll site?

Adding a contact form lets visitors reach you without exposing your email to spam bots. A good contact form helps you get more messages because people are more likely to fill out a form than send an email. It filters spam automatically so junk stays out of your inbox. All messages land in one place instead of scattered across email threads.

Chirp Form gives you a simple solution that works perfectly with Jekyll's static architecture while respecting visitor privacy with EU hosting and GDPR compliance.

How Chirp Form works with Jekyll

The <chirp-form> element displays your contact form where visitors write and submit messages. Chirp Form handles everything behind the scenes. It stores submissions, filters spam and sends email notifications while your Jekyll site stays completely static. Submissions are identified through privacy-friendly cryptographic hashing rather than storing IP addresses or personal data directly.

Installation steps

Step 1: Add the Chirp Form script

Add the Chirp Form script to your Jekyll layout file. For most sites this goes in _layouts/default.html in the <head> section:

<head>
  <!-- Your existing head content -->
  <script defer src="https://embed.chirpform.com/latest/chirpform.umd.js"></script>
</head>

The defer attribute ensures the script loads without blocking your page content.

Step 2: Add to your contact page

Create a new file called contact.md in your Jekyll root directory:

---
layout: default
title: Contact
permalink: /contact/
---

# Get in touch

Have a question or want to work together? Send me a message.

<chirp-form form-id="YOUR_FORM_ID"></chirp-form>

Replace YOUR_FORM_ID with your actual form ID from your Chirp Form dashboard.

Step 3: Configure your form (optional)

You can fully customize your form fields through your Chirp Form dashboard. The form automatically fetches your configuration and renders everything you've set up.

For styling, you can fully customize the appearance using standard CSS. Check the styling documentation for detailed customization options.

Alternative solutions

Unlike other form services, Chirp Form is hosted and run from the EU. It doesn't store massive amounts of unencrypted data or track users across the web. You get a straightforward solution that respects your visitors' privacy.

Get started with Chirp Form on Jekyll

Ready to add contact form to your Jekyll site? Sign up for Chirp Form and get your form ID to start receiving messages in minutes.

Related guides

More ways to use Chirp Form with Jekyll: comments and testimonials.

Want to add contact form with Chirp Form to a different platform?

Add forms to any site. Display responses anywhere.

Try Chirp Form for free. No credit card required.