Works within Pages' limits
GitHub Pages will never run your backend code, and with mailcontact it doesn't need to. The form posts to mailcontact's servers; your repo stays 100% static files.
integrations · hosting platform
GitHub Pages serves static files only (no functions, no API routes, no server-side anything), so a contact form can't be handled on the site itself. The fix is a form that posts to an external endpoint: point plain HTML at your mailcontact form URL and submissions land in your project's inbox, with a ping in Discord, Slack, or email.
There's nothing to install and nothing to build. The snippet below works in a hand-written index.html, a Jekyll layout or include, or any static site you push to a gh-pages branch. Commit, push, done.
You also get a real inbound email address (yourproject@mailcontact.app) alongside the form, useful when you don't want to publish your personal email in a public repo.
the snippet
Point the form at your project's mailcontact endpoint. Submissions land in your project inbox. No server, no API route, no email service to wire up.
<form action="https://mailcontact.app/api/forms/your-form-id" method="POST">
<input type="text" name="name" placeholder="Your name" />
<input type="email" name="email" placeholder="you@email.com" required />
<textarea name="message" placeholder="What's on your mind?" required></textarea>
<button type="submit">Send</button>
</form>how it works
One inbox per project. Name it after your repo and you get a form endpoint and a project email address immediately.
Paste the snippet into index.html, a Jekyll include, or wherever your contact section lives. Push to your Pages branch as usual.
Add a Discord, Slack, email, or webhook channel. Every submission pings you where you already are.
why mailcontact
GitHub Pages will never run your backend code, and with mailcontact it doesn't need to. The form posts to mailcontact's servers; your repo stays 100% static files.
A mailto: link exposes your address to every scraper reading your source. A form endpoint and a yourproject@mailcontact.app address keep your personal email out of the repo entirely.
Docs site, portfolio, project page: each GitHub Pages site gets its own inbox and its own address, instead of everything piling into your personal email.
faq
No. GitHub Pages serves static files and runs no server code, so it can't process a POST. Forms on a Pages site must submit to an external endpoint like mailcontact.
Yes. The snippet is plain HTML, so it works in a Jekyll layout, an include, or a Markdown page with inline HTML. GitHub's Jekyll build doesn't touch it.
Submit with a few lines of fetch in a JS handler to keep the visitor on your page and show an inline thank-you. The endpoint has open CORS, so it works from any github.io or custom domain. A configurable redirect for native form posts is coming with the launch.
Completely. It's your markup. mailcontact only provides the endpoint. Use your existing CSS, your Jekyll theme's classes, or anything else; there's no widget or iframe.
related
Forms and a real email address, together, with notifications where you live. Launching soon. Be the first to know.