Hugo is a single binary. You download it, put it on your PATH, run hugo, and your finished site is sitting in public/: HTML, CSS, images. You need no runtime or package manager for that, and no lockfile that has a different opinion at the next checkout. It is written in Go and exits as soon as the build is done. That is why people stay with Hugo. It is also why the contact form is about to get annoying.
What makes Hugo fast
The comparison that matters is Jekyll, and it is uncomfortably one-sided. With Jekyll you are not installing a program so much as an environment that needs looking after: a Ruby version, a version manager, a Gemfile, a Gemfile.lock, bundle install, native extensions that expect a C compiler, and bundle exec in front of every command so you get the version from the lockfile. In Hugo, the answer to “which version is running here” is a file: your CI downloads it, checks it against the checksum and runs it.
Then there is the speed, which you genuinely notice in a day’s work. hugo server rebuilds only what changed, keeps the result in memory, and the livereload usually lands before you have switched windows. At a thousand pages that decides whether you try something out quickly or go and get a coffee in the meantime.
That one binary also holds more than its size suggests: taxonomies, multilingual sites, image processing with .Resize and .Fill, an asset pipeline that compiles SCSS, minifies it and appends fingerprints. The built-in SCSS transpiler needs the extended edition, which is also just a download. None of it needs a plugin, because Hugo has no plugin API.
The downsides come with it. Go templates are a matter of taste: {{ with }}, {{ range }}, the pipes, and the dot that keeps changing context on you. And in 0.146 Hugo rearranged the layout structure - _default is no longer the place to look, partials became _partials, shortcodes became _shortcodes. If you have ever dragged an older theme forward, you felt it. And Jekyll is not the worse choice everywhere: if your team already writes Ruby, or your site sits on GitHub Pages, which builds Jekyll natively without you configuring any CI for it, switching buys you very little.
A generator has no runtime
Then the contact form turns up on the list. hugo runs, writes public/ and exits, which leaves no process behind. When somebody hits submit three hours later, there is nothing left of Hugo to receive that POST. Your web server or your CDN serves files; a POST against an HTML file gets a 405, or worse, a 200 and silence.
That is by design. Hugo is fast and boring to run because it does nothing at serving time. There is no request lifecycle to hook into, and so no routes and no middleware. hugo server changes none of that; it is meant for development rather than the open internet.
Hugo can certainly talk to the outside world. resources.GetRemote fetches data over HTTP, but only at build time. The request happens while you are building, not while somebody is reading your page, which is too late for a form.
That is why most Hugo contact form guides end in the same place. They cover the markup and the partial, and then comes the sentence telling you to go and get a service. That has less to do with laziness than with the fact that Hugo genuinely has nothing left to explain there. The alternatives all amount to a second system, such as a serverless function or a PHP script because a web server is running anyway. Every one of them takes back the deployment that used to be a single folder.
Wiring it up
So the POST has to go where something is running, and an action pointing at a foreign domain is all it takes - no browser has ever objected to that. In Hugo a URL like this is a constant just as baseURL is, and constants belong in the site configuration.
baseURL = 'https://example.com/'
title = 'example.com'
[params]
formEndpoint = 'https://api.formdall.de/api/v1/f/kx92m4'The URL now sits in exactly one place instead of in every template that shows a form; for staging you swap one line. The form itself is a partial - since 0.146 under layouts/_partials/:
<!-- endpoint comes from hugo.toml, not from the markup -->
<form action="{{ site.Params.formEndpoint }}" method="POST">
<label for="name">Name</label>
<input id="name" name="name" required>
<label for="email">Email</label>
<input id="email" name="email" type="email" required>
<label for="message">Message</label>
<textarea id="message" name="message" rows="6"></textarea>
<button type="submit">Submit</button>
</form>No client-side JavaScript is required for this, and no extra deploy step. One {{ partial "contact-form.html" . }} in a template and the page has a form; if you want it from Markdown too, you wrap the partial in a shortcode under layouts/_shortcodes/ and write {{< contact-form >}} in the text.
Where the visitor goes after submitting is set per form - usually /thanks/, and on your side that page is simply content/thanks.md, which the same build produces. If the form should submit without leaving the page, your script sends the POST with Accept: application/json and reads the answer as JSON; the formEndpoint in hugo.toml does not change for it. If you would rather skip the typing, create_form creates the form along with its fields, get_embed hands you the finished partial, and your editor drops it under layouts/_partials/.
What you are not building
The work Hugo cannot take on, because none of it is running when the page is served, happens on our side. A submission runs through a chain of checks before it reaches your inbox. Where it needs a hurdle, we host the proof-of-work captcha ourselves; it sets no cookies, tracks nobody, and runs on our servers rather than a US provider’s. Not one file of that lands in public/; your site stays the set of static files Hugo wrote.
The servers are in Germany, and what the visitor sent off sits there encrypted. Inside the application their IP exists only as a hash that changes daily, and we delete server logs after 14 days. When a period runs out, the daily deletion run takes the submission physically out of the database, instead of flagging a row as deleted and quietly keeping it. Access under Art. 15 and erasure under Art. 17 GDPR are one click on the email address, and you can export your own account as a ZIP. And if the submissions should additionally run into your own system, the webhook goes out HMAC-signed, with SSRF protection against internal targets. The guide on an n8n webhook with an AI agent shows what that looks like.
None of this is impossible to build yourself. You only find out how much is attached to it once you start: setting up SPF, DKIM and DMARC, keeping domain reputation up, reading bounces, updating the spam rules when the next wave looks different. What separates it from Hugo is how long it runs. A build takes a few seconds; a service like this has to stay reachable and maintained, which is a different kind of work from “run hugo and you are done”. Three forms and 100 submissions a month are free.