Toimii has soft launched — the service is live and sign-ups are open. Try it free →

Toimii has soft launched, so these guides describe a service you can sign up for and use today. A few pieces are still on the way — the iOS and Android apps arrive later 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, 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-your-code></toimii-your-code>
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 template that wraps every page — the one that already contains your <body> tag.
2
Paste the embed code
Paste the two lines from your component's page in Toimii inside <body>. To show the form on only some pages, wrap both lines in your generator's conditional — the script and the tag belong together.
3
Build and deploy
Build and deploy the way you normally do. Then open the published page and send yourself a test message.

Gotchas

  • Put the tag in a template, not in a Markdown content file. Whether raw HTML survives Markdown is a per-generator setting — in Hugo it takes markup.goldmark.renderer.unsafe — while a template is not run through Markdown at all.
  • Astro bundles script tags whose only attribute is src. Ours carries async as well, and any attribute beyond src makes Astro leave the tag alone — so it works as written. If you ever trim it down to src alone, add is:inline.
  • Static hosts don't add a Content-Security-Policy by default. If you set one yourself — as an HTTP response header or a <meta> tag — allow cdn.toimii.io in script-src and api.toimii.io in connect-src.

Frequently asked

How do I add it in Astro, Hugo, 11ty or Jekyll?

Nothing differs between them — the steps above are the whole procedure in all four. We give no file path for the template on purpose: each generator names that file differently and the names have changed between versions, so check your own generator's docs.

Does it work on GitHub Pages, Netlify, Vercel or Cloudflare Pages?

Yes, and on any other host that serves static files — nothing runs on your side. What matters is the address rather than the host: submissions are accepted only from the domain you listed in Toimii, so a preview build on the host's own subdomain renders the form but refuses the message.

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.