Jekyll

A Jekyll contact form that does not need a plugin.

Jekyll builds files. GitHub Pages will not run a mail plugin. The form has to post to a form backend.

The HTML

<form action="https://smote.sh/f/FORM_ID" method="POST">
  <input name="email" type="email" required>
  <textarea name="message" required></textarea>
  <input type="hidden" name="_redirect" value="https://yoursite.com/thanks">
  <button>Send</button>
</form>

Include, not a plugin

Save the form as _includes/contact.html. In a page: {% include contact.html %}. That is allowed on GitHub Pages. A Ruby mailer gem is not.

Same form on GitHub Pages

If the site already lives at *.github.io, this is the whole setup. Guide for the host: GitHub Pages contact form.

Get an action URL Docs

Also: GitHub Pages · Hugo · Astro · Cloudflare Pages · Any static site