Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Eleventy (11ty)

A simple contact form for Eleventy static sites. Since Eleventy generates plain HTML, FormHandle is a natural fit.

Setup

mkdir my-site && cd my-site
npm init -y
npm install @11ty/eleventy
npx formhandle init

Copy contact.njk into your site's root (or src/ if configured).

Replace YOUR_HANDLER_ID with your handler ID, or use an Eleventy data file:

// _data/formhandle.js
module.exports = {
  handlerId: process.env.FORMHANDLE_ID || 'YOUR_HANDLER_ID'
}

Then in the template: action="https://api.formhandle.dev/submit/{{ formhandle.handlerId }}".