Introducing Gratilaus Site and Gratilaus Form - A Static Site Generator and a Contact Form Backend for AWS

First Published:
Last Updated:

This article is the first entry for the hidekazu-konishi.com Advent Calendar 2026. On December 1, 2026, I released two products: Gratilaus Site, a static site generator, and Gratilaus Form, a contact form backend. This article will explain what each product does, why they are built the way they are, and how they can be used together. Details on versions, setup instructions, and licensing terms are on each product's page.

Table of Contents

  1. 1. What Gratilaus Site and Gratilaus Form Are
  2. 2. Why I Built Them
  3. 3. How the Two Fit Together
  4. 4. Design Choices
  5. 5. Why the License Asks for a Credit
  6. 6. Getting Started
  7. 7. What's Next
  8. 8. Frequently Asked Questions About Gratilaus Site and Gratilaus Form
  9. 9. References

1. What Gratilaus Site and Gratilaus Form Are

Gratilaus Site is a static site generator and a site template in one. A Python script creates a complete website from a folder containing HTML fragments and YAML metadata. This includes pages, sitemaps, RSS and Atom feeds, JSON-LD, llms.txt, Open Graph tags, and site search functionality. It does not use any CMS, databases, or JavaScript frameworks. Nothing runs on a server, and the files you deploy are what the browser reads.

Gratilaus Form is a contact form backend for static websites. Users deploy it to their own AWS accounts. A single AWS SAM template creates an Amazon API Gateway endpoint and an AWS Lambda function. The function checks the submitted data and then sends it by email to the site owner's inbox through Amazon SES. There is no database and no admin panel.

Neither is a browser tool. You download a ZIP file and run it on your own computer or deploy it from there. The features of each product are listed on its product page.

2. Why I Built Them

What I wanted to create was a tool that would let me keep my own static site in my own hands.

First, I did not want to place a runtime environment that needed constant updates in a production environment. Using a CMS or database means that as long as the site exists, you always have the ongoing task of keeping those systems up to date. With static pages, the files you deploy are simply read as they are.

Next, I wanted to be able to edit the generated pages by hand. If the HTML output from the generation tool is in a format that is difficult to understand, even making small corrections would require going through the tool's processes. Gratilaus Site does not require you to adopt a specific tool's workflow; you can simply copy a single folder and get started.

The remaining challenge was the contact form. Static sites do not inherently have a server to receive form submissions. The common solutions are to rely on external form services or to build your own backend. I wanted to avoid adding external services or constantly running servers just for contact forms. That is why I created a small backend in my own AWS account that only runs when a submission is received. That is Gratilaus Form. Gratilaus Form focuses on a single task: it checks the submitted content and sends a single email to one fixed recipient. It does not store any submitted data, accept file attachments, or reply to visitors.

3. How the Two Fit Together

How Gratilaus Site and Gratilaus Form Fit Together
How Gratilaus Site and Gratilaus Form Fit Together
Gratilaus Site generates and checks pages on your local computer. The output folder is then served from a static host such as Amazon S3 and Amazon CloudFront. The included deploy script synchronizes the output to an existing S3 bucket and invalidates the CloudFront cache. It does not create the bucket or the CloudFront distribution; the process for setting them up is detailed on this site's Indie Dev Guide: From Domain Acquisition to Live Site with AWS Route 53, S3, CloudFront, and ACM.

The contact page uses the included mailform.js to send JSON data to the Gratilaus Form endpoint. API Gateway receives the request, a Lambda function checks it, and SES sends it to the site owner's inbox. All it takes to connect the two is to put the endpoint URL shown during the Gratilaus Form deployment in the Gratilaus Site settings and rebuild.

Either product can be used on its own. The output from Gratilaus Site consists of ordinary files, so it can be served from any static host. If you do not need a contact form, you do not need Gratilaus Form. Conversely, Gratilaus Form accepts JSON in the same format from any page, even a hand-written HTML form with a small script. The mailform.js file is included in both ZIP files.

4. Design Choices

Instead of listing the features, this section describes the five choices that set the shape of the products, and the reasons for them.

4.1 Output You Can Edit by Hand

Gratilaus Site generates plain HTML that you can comfortably edit by hand. It does not output hashed class names or framework wrapper elements. The scripts are written in Python and plain JavaScript, there is no generated code in them, and no build tool is needed besides Python. Node.js is only used when creating search indexes. To modify the appearance or components, you can use settings and customizable hooks (insertion points) without directly editing the product's templates. Because the product files and your own files are kept separate, you can preserve your changes when updating to a new version.

4.2 Search Served from Your Own Site

Site search uses Pagefind. The index is created within your site during the build process and is served from your own site. This means that search queries never leave the reader's browser. The generated pages do not make requests to external hosts. The icons are inline SVGs, and the fonts are system fonts. The check script fails if it detects any resources from a different origin in the output. Exceptions can be made only when explicitly permitted, such as for embedded videos or advertising slots.

4.3 A Form Backend in Your Own AWS Account

Gratilaus Form operates in the user's own AWS account. When a visitor submits the form, the data passes through API Gateway and Lambda, and is then delivered to the site owner's inbox via SES. No external form service is involved. The product does not utilize a database and does not store any submitted data. Furthermore, the information provided by visitors is not logged. The only place messages are kept is the site owner's mailbox. AWS charges the usage fees to the user's account. If specified, the stack will also create an SES domain identity (Easy DKIM). If the domain's DNS is in an Amazon Route 53 hosted zone, the stack also writes the DKIM records there. Setting up SPF and DMARC along with it is covered on this site in Setting up DKIM, SPF, DMARC with Amazon SES and Amazon Route 53 - An Overview of DMARC Parameters and Configuration Examples.

CORS handling is centralized in a single location. The same function responds to both the preflight request (a preliminary check sent by the browser) and the submission itself. If the CORS headers are missing only in the response to the submission, the email is delivered, but the browser discards the response. Visitors will see an error, prompting them to resubmit, and the same inquiry arrives twice. This design is intended to prevent this issue.

4.4 Checks Before You Publish

The products also include checks to run before publishing. Gratilaus Site's check.py builds the site into a temporary folder and checks page structure, feeds and sitemap, JSON-LD, internal links, and the WCAG AA contrast of the light and dark color palettes, among other things. Before it calls AWS, Gratilaus Form's deploy script stops on settings that would deploy fine and then make every submission fail. Malformed origins or addresses and invalid form definitions are examples. By using the --check-forms flag, you can verify the form definitions without actually calling AWS.

4.5 Made for People and AI Agents

The products were created with consideration for both human and AI readers.

For users building sites with AI coding agents, I included AGENTS.md in both product ZIP files. AGENTS.md is an open format for writing instructions for coding agents. For Gratilaus Site, AGENTS.md instructs the agent to only modify the user's files (settings, content, custom stylesheets, and hooks), while leaving the product files untouched. It also requests the following:

  • After making changes, run the build and the check, and do not report completion until both have succeeded.
  • The footer credit is subject to the license terms, so do not remove it; instead, raise it with the user.
  • Publishing is left to the user's discretion.

For Gratilaus Form, AGENTS.md requests that the agent add a credit line when adding the form to a page, verify the form using tests and the --check-forms flag, and leave deployment to the user. How to have a tool read the file varies by tool, so I documented it in QUICK_REFERENCE.md.

Error messages are designed to allow both humans and AI agents to determine the next steps. The Gratilaus Site configuration is fully documented in config/site.schema.json, allowing both code editors and agents to verify the values. The build process will halt if the configuration contains values outside of the defined options, duplicate keys, or files not saved in UTF-8, and will specifically identify the affected files and the recommended correction methods. build.py and check.py use defined exit codes. Success returns 0; if the build halts or the check finds issues, they return 1; and an error in the command syntax returns 2.

The generated site is also designed to be readable by both humans and AI. In addition to plain HTML that can be read without running any scripts, the build process generates the following files:

  • llms.txt: A short Markdown index for the site.
  • JSON-LD for the site and its pages.
  • sitemap.xml and sitemap.txt.

However, how AI services rank and cite the site is determined by each individual service.

5. Why the License Asks for a Credit

The two products are distributed under the Gratilaus Attribution License 1.0, a license derived from the Apache License 2.0. The primary difference is the addition of Section 4A, which requires a website published with the products to show a credit.

I asked for a credit because I wanted the author to be visible. I wanted a site built with the products to show which software it was built with and to lead back to the author. At the same time, I kept the other obligations to a level comparable to the Apache License 2.0. The license allows use, modification, redistribution, and commercial use in the same way as the Apache License 2.0. For a site that does not want to show the credit, there is also another way that costs nothing.

This article does not restate the terms. The exact terms are in Section 4A of the license and in the "Important Notes" section on each product's page. The full text of the license is available at Gratilaus Attribution License 1.0. This license has not been submitted to or approved by the Open Source Initiative; therefore, it is not an open-source license approved by the OSI.

A credit only shows which software a site is built with, and the responsibility for the site rests with its operator. Details are in "Downloadable Software Disclaimer" in the privacy policy.

6. Getting Started

Getting started is a simple three-step process. You will find detailed instructions and commands on the product pages, as well as in the START_HERE.html file included in the ZIP archive.

  1. Download the ZIP file from the product page for the product you want to use. Verify the downloaded file using the SHA-256 hash provided on the page, then extract the contents. Open START_HERE.html in the unzipped folder in your browser.
  2. For Gratilaus Site, build the sample site locally to preview it, then replace the configuration and sample pages with your own content.
  3. For Gratilaus Form, prepare a sender address in SES, then deploy it to your AWS account. Put the displayed endpoint in your contact page and send one test message.

Each release of both products is run and checked on macOS. Linux and Windows are supported on a best-effort basis.

7. What's Next

When a new version is released, its release notes and download link go on the product pages, and the entries in this site's feeds are updated. Bug reports and suggestions are welcome through the contact options on hidekazu-konishi.com.

This article is the first entry for the hidekazu-konishi.com Advent Calendar 2026. You can find the articles for the other days in December on this calendar.

8. Frequently Asked Questions About Gratilaus Site and Gratilaus Form

In addition to the FAQs on each product page, this section answers questions that come up when you look at the two products together.

8.1 Is it free?

Downloading is free of charge. The license permits you to use, modify, and redistribute the software, including commercial use. The primary condition of the license is to show a credit on the sites you publish. AWS charges any fees for running the software on AWS to the user's AWS account.

8.2 Why are they two downloads instead of one?

This is because they are independent of each other. Sites built with Gratilaus Site can be published even without a contact form, and can also be served from static hosts other than AWS. Gratilaus Form accepts JSON data in the same format from pages not built with Gratilaus Site. Furthermore, the code for Gratilaus Form runs in the user's AWS account and only changes when the user deploys it.

8.3 When is it not a good fit?

Gratilaus Site is not suitable for sites that need comments, user accounts, scheduled publishing, or a WYSIWYG editor. All of these need a server, and Gratilaus Site is intentionally designed without a server. Gratilaus Form does not store submitted content, accept file attachments, or send replies to visitors (Section 2). If you need these functionalities, choose another approach.

9. References



References:
Tech Blog with curated related content

Written by Hidekazu Konishi