Step 1 — Create new form endpoint on Getform

All that's required is a name for your form. You specify a name, and Getform will provide a unique form endpoint to identify your Pelican form.

Step 2 — Prepare your Pelican contact form for your website

You can use the boilerplate code provided on Getform to create your HTML form. It is a basic contact form with email address, name and message fields:

<form accept-charset="UTF-8" action="https://getform.io/f/{unique-endpoint-generated-on-step-1}" method="POST">
  <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>

Step 3 - Add a Contact Section to your Pelican site

Using Pelican, it's as easy as creating or dropping a new file into the content/pages directory. Name the file contact.md and it will turn up in your pages as ‘contact’. Make sure you’ve installed support for markdown with python -m pip install "pelican[markdown]"

Give your new page the attributes you want, of which title is the only thing that’s required:

Title: Contact
Slug: contact
Lang: en

<form accept-charset="UTF-8" action="https://getform.io/{unique-endpoint-generated-on-step-1}" method="POST">
    <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>

Your file will initially be available in your output folder as contact.html. However, in your pelicanconf.py you can set the URLs of pages with the following settings:

PAGE_URL = '{slug}/'
PAGE_SAVE_AS = '{slug}/index.html'

For more information on writing Pelican pages, you check out the Pelican docs.

Step 4 - Run your Pelican site locally to finalize setup

Run the following command to see your Pelican form in action at localhost:8000/contact/:

$ pelican content
$ pelican -listen

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