# Jekyll Integration

Jekyll is a parsing engine bundled as a ruby gem used to build static websites from dynamic components such as templates, partials, liquid code, markdown, etc.

You can integrate Getform to your Jekyll website to handle the backend of your static forms easily.

# Create a new blank Jekyll site

Run the following commands to create a simple Jekyll website:

$ gem install bundler jekyll
$ jekyll new my-first-jekyll-blog
$ cd my-first-jekyll-blog
~ my-first-jekyll-blog $ bundle exec jekyll serve

# Add a Contact Form to your Jekyll site

Create a new directory and name it as contact under your _sitedirectory and put index.html inside of it. Create a new markdown file and name it as contact.markdown file, change its content with the following code block:

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

<form accept-charset="UTF-8" action="https://getform.io/{your-form-endpoint}" method="POST" enctype="multipart/form-data" target="_blank">
    <input type="email" name="email" placeholder="Your Email">
    <input type="text" name="name" placeholder="Your Name">
    <input type="text" name="message" placeholder="Your Message">
    <button type="submit">Send</button>
</form>

TIPS

  • Don't forget to change the action attribute to a form endpoint URL with yours.

  • Setting permalink: contact will ensure that your new page is available at yourdomain.com/contact.

# Run your Jekyll site locally to finalize setup

Run the following command to see your Jekyll form in action at localhost:4000/contact/:

jekyll serve

That's it! Your Jekyll site is now running Getform.