Toimii is launching in 2026 — this site is an early preview.

These guides describe Toimii once it's live. The dashboard and billing aren't available yet — Toimii launches in 2026.

Add a contact form to your static site: Astro, Hugo, 11ty, Jekyll

One snippet in your layout template. Works in Astro, Hugo, 11ty, Jekyll, Gatsby, Bridgetown, and every other static-site generator.

<!-- Add this anywhere on your page -->
<script src="https://cdn.toimii.io/components/your-code.js" async></script>
<toimii-contact></toimii-contact>
Does this actually work?

Yes — and static sites are the cleanest case. No plugin sandbox, no editor stripping scripts, no plan tier. The two lines drop into your layout template the same way they'd go into any HTML file.

Step by step

1
Open your layout template
Open the layout template that wraps every page — _layouts/default.html in Jekyll, src/layouts/Base.astro in Astro, layouts/partials/footer.html in Hugo, _includes/layout.njk in 11ty.
2
Paste the embed code
Paste the two lines from your Toimii dashboard inside <body>. To only show the form on certain pages, gate the custom element with your generator's templating (front matter flag, page slug check, etc.); the script tag can stay in the layout.
3
Run the dev server
Run your dev server (npm run dev / hugo server / jekyll serve). The form renders immediately — no extra config, no plugin, no @types.
4
Build and deploy
Build and deploy as usual (Netlify, Vercel, GitHub Pages, S3 + CloudFront, wherever you host). The form keeps working — Toimii's CDN handles the rest.

Common gotchas

  • Most static-site Markdown renderers strip raw HTML by default. In Jekyll / 11ty / Hugo, enable raw HTML or paste the embed in a layout file instead of a content file.
  • Hot reload sometimes re-injects the script multiple times during dev. That's a dev-only quirk; production builds emit the tag once per page.
  • Some hosts add aggressive Content-Security-Policy headers (Netlify and Vercel let you customize). Allow cdn.toimii.io and api.toimii.io in script-src and connect-src.
  • Don't put the snippet in <head>. The custom element is a body-level tag — keep the script in <head> if you must (with async), but the tag has to be in <body>.

Frequently asked

How do I add it in Astro?

Drop the script tag in your base Layout component (e.g. src/layouts/Base.astro) and use the custom element in any .astro file. Astro renders unknown elements as plain HTML — no client directive needed for the tag itself.

How do I add it in Hugo?

Add the snippet to your layouts/partials/footer.html (or wherever you load custom scripts) and use the custom element in your content files, layout templates, or shortcodes.

How do I add it in 11ty (Eleventy)?

Add the snippet to your base layout (_includes/layout.njk in Eleventy defaults). It applies to every page that extends the layout. Set hot-reload on; you'll see the form as soon as the dev server rebuilds.

How do I add it in Jekyll / GitHub Pages?

Add the snippet to _layouts/default.html (or your layout of choice). Use the custom element in any Markdown post by enabling html in the Markdown renderer.

Will it slow down my build?

No. The script loads at runtime, not build time — your build emits the script tag and the browser fetches the actual component when a visitor hits the page. Astro, Hugo, 11ty, Jekyll: all unaffected.

Embedding on a different platform?

Same two lines of code, picked apart for each platform.

Ready to try it?

30-day free trial. No credit card. Set up in minutes.

No credit card required. Set up in 2 minutes.