FORMDALL & JEKYLL

GitHub Pages builds your site for free and runs nothing for it

6 min read·Jekyll 3 & 4

Jekyll is the only generator in this series you do not have to run yourself. You put Markdown in a repository, run git push, and a minute or two later the site is live. You do not need a workflow file, and no deploy token either: in the repo settings the source points at a branch, and GitHub Pages builds Jekyll for you. The build happens on a machine you do not own, under rules you do not write. Static hosting rarely gives you that much for free. The price is that your contact form here has no backend and no way of getting one.

What GitHub Pages takes off your hands

On this one point the comparison with the other generators in this series is clear-cut. For an Astro, Hugo or Eleventy site on GitHub Pages you write a workflow file: checkout, toolchain setup, build, actions/upload-pages-artifact, actions/deploy-pages. For Jekyll you pick an entry in a dropdown. Afterwards there is not one line in the repository explaining how the site gets built. Even that branch build now runs as an Actions run; GitHub recommends your own workflows for anything beyond it, and you simply never write this one.

The second reason is simply the age of the project. Jekyll has been around since 2009, and a lot of what looks like “the way it is done” today came from here: front matter between two --- lines, the date in the filename under _posts/, _layouts, _includes, _config.yml. Hugo, Eleventy and Astro all adopted the front matter convention from it. Themes here are gems and not just folders: theme: minima is enough, and you override only the files you want to change. On Pages that holds only for the themes on the list; for anything else jekyll-remote-theme points straight at somebody else’s repository.

The cost shows up in a version number you do not get to pick. GitHub Pages builds with a pinned Jekyll release a major version behind the current one. If you simply install jekyll locally, you develop against a different version than the one that builds your site. The countermeasure is the github-pages gem in your Gemfile, which locks your local environment to exactly what Pages runs - and now you are maintaining a Ruby environment again. Jekyll is not fast either; at a thousand pages Hugo is much faster.

The build is not yours

The contact form is where the free build shows its price. Jekyll is Ruby, and Ruby receives a POST without any trouble. jekyll serve is a running process with a real web server inside it. Nothing about this tool stops you from putting a Rack app in front of the generated files and handling /contact yourself. Nothing here is missing because of Jekyll. It is missing because of the host.

GitHub Pages serves files, and nothing else - and every way around that is closed on purpose. safe: true is one of the settings Pages fixes and you cannot change; safe mode disables everything that is not on the list, so _plugins/ never runs - your Ruby hook gets pushed and ignored. The list itself is public, a good thirty gems including themes, from jekyll-feed to jekyll-remote-theme; they all run during the build and have long since finished by the time somebody hits submit.

That leaves you two ways out, and both cost exactly what you came here for. You build locally and push the finished _site/ - and the free build is gone. Or you switch the source to GitHub Actions and write the workflow file after all: checkout, Ruby, bundle exec jekyll build, upload the artifact, deploy. Then you are where an Eleventy project starts out, only with Ruby - and you still have no server. Actions does the build and Pages serves the result. Nowhere in that chain does a request reach your code.

Liquid is deliberately narrow. Shopify wrote it to render other people’s templates on Shopify’s own servers, so it has no file access and cannot reach arbitrary Ruby. GitHub gets the same benefit and can build your templates without having to trust them.

Ruby alongside Jekyll could handle the form. You probably do not want to give up the free build to get there, and then the POST has to leave the repository.

Wiring it up

An action attribute has always been allowed to point at a foreign domain - older than Jekyll, and it needs nothing running. So the endpoint belongs in the file that decides everything on Pages anyway: a top-level key in _config.yml is available in every layout and every include as site.<name>.

_config.yml
title: example.com
url: "https://example.com"
theme: minima

form_endpoint: "https://api.formdall.de/api/v1/f/kx92m4"

Staging and production now differ by one line. One warning: jekyll serve reads _config.yml only at startup - automatic rebuilding does not cover this one file, so restart the server after a change.

The form itself is an include. A note on the comment inside it: it uses {% comment %} and not <!-- ... -->, because Liquid sees text rather than HTML - it evaluates {{ ... }} and {% ... %} inside an HTML comment too.

_includes/contact-form.html
<form action="{{ site.form_endpoint }}" method="POST">
  {% comment %} the endpoint comes from _config.yml, not from the markup {% endcomment %}
  <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>

Wherever the form should appear, you call {% include contact-form.html %}. No client-side JavaScript is needed for it, and no extra gem either. The source setting stays on the branch, so the deploy is unchanged.

After submitting, the visitor gets a redirect, configurable per form: typically to /thanks/. You write that page as thanks.md with permalink: /thanks/ in the front matter - without the permalink Jekyll produces thanks.html, and the URL with the trailing slash goes nowhere. If you would rather not use permalinks, name the file thanks/index.md. With Accept: application/json you get JSON back instead, if you would rather use fetch(). And if you do not want to type the include: create_form creates the form, get_embed hands back the markup, and your editor writes it into _includes/.

What you are not building

The spam filtering happens beforehand, on our servers, in several stages before a submission reaches your inbox. Nothing in your repository changes for it, and you add no gem that would have to be on the allowlist. The include carries no third-party widget, and you can skip the cookie banner because nothing sets a cookie. Your site stays the folder of static files GitHub built.

None of that takes a line of server code in your repository - code Pages would refuse to run anyway. Submission contents sit encrypted in the database, on servers in Germany. Access and erasure requests under Art. 15 and Art. 17 GDPR you handle per email address in the dashboard, and a full account export comes as a ZIP. And if the submissions have to go somewhere else: webhooks are HMAC-signed per form and protected against SSRF towards internal targets. Without a server of your own, an n8n webhook with an AI agent is one way to do it.

Building it yourself starts with finding a place where it is allowed to run. GitHub Pages is not that place, so a second host joins the project, and with it SPF, DKIM and DMARC, the domain reputation, the bounces and the spam rules somebody has to keep current. A form is quickly built, whereas a form backend is something you operate, running while nobody is watching, which is precisely the kind of work you just handed to GitHub Pages. Three forms and 100 submissions a month are free. Nothing else in the setup moves: you still push, and GitHub still builds.

OR: LET THE AI DO IT
YouBuild me a contact form include for my Jekyll site.
Assistant formdall · create_form formdall · get_embedForm created. Here is the include:
<form action="{{ site.form_endpoint }}" method="POST">
  <input name="name" required>
  <input name="email" type="email" required>
  <textarea name="message"></textarea>
  <button>Submit</button>
</form>
→ read the MCP docs

Create the endpoint, put it in _config.yml

Start for freeno credit card, ever
  • Free
  • 3 forms
  • 100 submissions/mo