# Pelican Integration
# Create new Pelican site
Installing Python:
$ python -m pip install "pelican[markdown]"
Create a quickstart Pelican site by running the following commands:
$ mkdir -p ~/projects/yoursite
$ cd ~/projects/yoursite
$ pelican-quickstart
Generate and preview your Pelican site
$ pelican content
$ pelican --listen
Pelican will start a hot-reloading development environment that is accessible by default at http://localhost:8000/
.
# Add a Contact Section to your Pelican site
Give your new page the attributes you want, of which title is the only thing that is required:
Title: Contact
Slug: contact
Lang: en
<form accept-charset="UTF-8" action="https://getform.io/{your-form-endpoint}" 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 can check out the Pelican docs (opens new window).
# 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.