All guides

Contact form for Jekyll

Jekyll sites are static, so form posts need an external endpoint. Keep the form in an include and the form ID in _config.yml, so every page and theme uses the same form.

Get my free form link Replace YOUR_FORM_ID below with your form ID, or copy the snippets from your dashboard where it's already filled in.

Step by step

  1. Create a form in Pasteform and copy its ID (starts with f_).
  2. Add pasteform_id: YOUR_FORM_ID to _config.yml and restart jekyll serve.
  3. Create _includes/contact-form.html with the code below.
  4. Use {% include contact-form.html %} in any page or layout. Kramdown passes the HTML through.

_config.yml

pasteform_id: YOUR_FORM_ID

_includes/contact-form.html

<form action="https://forms.prizenlabs.com/f/{{ site.pasteform_id }}" method="POST">
  <input type="hidden" name="_redirect" value="{{ site.url }}/thanks/">
  <label>Name <input type="text" name="name" required></label>
  <label>Email <input type="email" name="email" required></label>
  <label>Message <textarea name="message" required></textarea></label>
  <input type="text" name="_gotcha" style="display:none" tabindex="-1" autocomplete="off">
  <button type="submit">Send</button>
</form>

Allowed domains

Add your domain (and localhost for jekyll serve).

Common pitfalls

What you get

Make your Jekyll form send

Free form link in about 2 minutes. No credit card.

Get my free form link

Guides for other platforms

Lovable · Bolt · v0 · Framer · Webflow · Astro · Next.js · Hugo · GitHub Pages · Netlify · Vercel · WordPress (static export) · Carrd · plain HTML