Gratilaus Site - Python Static Site Generator and Site Template with Search, Feeds, and Amazon S3 Deploy

First Published:
Last Updated:

Gratilaus Site is a static site generator and a site template in one download. A Python script turns a folder of HTML fragments and YAML metadata into a complete website — pages, sitemaps, RSS and Atom feeds, JSON-LD, Open Graph tags, a PWA manifest, a service worker and client-side search — and a check script verifies the result before you publish it. There is no CMS, no database and no JavaScript framework, and nothing runs on the server: what you deploy is what the browser reads.

Unlike the other tools on this site, this is not a browser tool. You download it, edit it and run it on your own computer.

See it running first: demo.gratilaus.com is a live demo, built from the sample content in the download as it ships (in Japanese: ja.demo.gratilaus.com).

Download

Gratilaus Site 1.0.0 (released 2026-12-01, Gratilaus Attribution License 1.0)
gratilaus-site-1.0.0.zip (376 KB, 98 files)
SHA-256: a646e0ad6c4be50cf0238a9325b9a87c476afd5be6096a48c0defe7180495cd9 (.sha256 file)
Requires Python 3.10 or later. Node.js is optional (only for the search index).

Check the ZIP file before you unzip it. Run the command for your system in the folder where you saved it: it prints a SHA-256 hash that must match the one above (Windows prints it in upper case; the case does not matter). On macOS and Linux, if you also saved the .sha256 file next to the ZIP file, shasum -a 256 -c gratilaus-site-1.0.0.zip.sha256 (macOS) or sha256sum -c gratilaus-site-1.0.0.zip.sha256 (Linux) compares them for you.

  • macOS: shasum -a 256 gratilaus-site-1.0.0.zip
  • Linux: sha256sum gratilaus-site-1.0.0.zip
  • Windows (PowerShell): Get-FileHash .\gratilaus-site-1.0.0.zip -Algorithm SHA256
  • Windows (Command Prompt): certutil -hashfile gratilaus-site-1.0.0.zip SHA256

Platforms: each release is run and checked on macOS. Linux and Windows are supported on a best-effort basis: the scripts are plain Python, with a launcher for each OS, and are written and reviewed for both, but a release may not have been run on them. This release was also checked on Linux in Ubuntu 26.04 LTS, Ubuntu 24.04 LTS and Debian 13 containers (Docker) and on Windows 11 (Command Prompt and Windows PowerShell). If something breaks there, please report it (see "Support and Reports" below).

Release Notes

1.0.0 (2026-12-01) is the first release. It includes:

  • A generator for blogs, websites and anything between: article, page, category, tag, date and author pages with pagination, breadcrumbs, related articles and previous and next links, each listing optional.
  • Layout options: the sidebar on either side or off, section sub-menus, dropdown menus that work without hover, the search box inside the header or below it, a phone quick bar with the buttons you choose, and a sidebar that stays in view.
  • Search served from your own site with Pagefind; with theme.search_load: interaction its script and stylesheet are fetched only when the search box is first used.
  • Two languages built in: English and Japanese, switched with one setting.
  • Moving an existing site: build.url_style keeps /about/ or /about.html addresses, links written in the other style (including absolute links to your own host) are retargeted at build time, and a build-time content filter can rewrite imported HTML.
  • Staging copies: --env <name> for the build, the checks and the deploy script, site.noindex for a copy that search engines should not index, and site.launch_date for a site that is not public yet.
  • Extending without forking: hook templates, page-specific styles and scripts, site-wide extra CSS, site-wide structured data, ad slots and a contact form client.
  • Checks before you publish: page structure, feeds, JSON-LD, links, third-party requests and WCAG AA contrast of both palettes.
  • macOS, Linux and Windows: plain Python scripts with a deploy launcher for each OS.
  • Guides for the first time: a step-by-step quick start and a one-sheet quick reference, in English and Japanese, which START_HERE.html in the ZIP file shows in your browser.

The complete list of changes is in CHANGELOG.md (English) and CHANGELOG.ja.md (Japanese) in the ZIP file.

Read the announcement: Introducing Gratilaus Site and Gratilaus Form - A Static Site Generator and a Contact Form Backend for AWS

Features

  • One script, readable output: scripts/build.py renders Jinja2 templates into plain HTML that you would be willing to edit by hand: no hashed class names, no framework wrappers.
  • Blog, website, or anything in between: the home page, category, tag, date and author listings are each optional, so the same template serves a blog, an organization's website, or a mix of both.
  • Generated for every build: sitemap.xml and sitemap.txt, RSS 2.0 and Atom feeds, JSON-LD (WebSite, BlogPosting, WebPage), Open Graph and Twitter Card tags, robots.txt, llms.txt, a PWA manifest and a service worker.
  • Search without a server: an optional Pagefind index is built into the site and served from your own origin, so search queries never leave the reader's browser. Pagefind itself is fetched with npx when you build, so that build step needs network access; --no-pagefind skips it.
  • No third-party requests from the pages it generates: icons are inline SVG and fonts are system fonts, and scripts/check.py fails if a cross-origin resource appears in the output — unless you allow one on purpose, for example an embedded video or an ad slot.
  • Checks before you publish: scripts/check.py builds into a temporary directory and checks page structure, feeds and sitemaps, JSON-LD, internal links (including absolute links to your own host), inline event handlers, the WCAG AA contrast of both color palettes, the locale files and the JavaScript.
  • Made to work with AI coding agents: AGENTS.md in the folder tells an agent which files are yours to change (the settings, the content, and a stylesheet or hook of your own) and which belong to the product, that the footer credit is a license condition to raise with you rather than remove, and that publishing is yours to do. QUICK_REFERENCE.md has the commands, the files and the common errors in one place.
  • Errors an agent can act on: config/site.schema.json describes every setting for editors and agents. A value outside a setting's fixed choices, a key written twice, or a file not saved as UTF-8 stops the build with the file and the fix named. build.py and check.py end with documented exit codes (0 when they succeed, 1 when the build stops or the check finds a problem, 2 for a wrong command line), so the result of a check can be read without reading its output.
  • Two languages built in: English and Japanese ship with the project. One setting switches the interface and the labels, and the content of every page that has a Japanese version (content.ja.html); another language is one YAML file.
  • Layout options without editing templates: sidebar on either side or none, section sub-menus, dropdown menus, a sticky header, the search box below or inside the header, a phone quick bar, light and dark palettes, and design tokens you can override from the configuration.
  • Accessibility features built in: a skip link, visible focus rings, keyboard-operable menus and panels (Escape closes them and focus returns to the button), and prefers-reduced-motion honored.
  • Optional deploy script: scripts/deploy.py syncs output/ to an existing Amazon S3 bucket with --delete (objects that are not in output/ are removed from the bucket; try --dry-run first) and invalidates the CloudFront cache. Launchers are included for macOS and Linux (deploy.sh) and Windows (deploy.cmd). It does not create infrastructure, and any static host works instead.
  • Staging copies: --env staging builds the same site for another host from a small override file (typically with noindex: true), and the deploy script refuses to send a staging build to the live bucket or the reverse.
  • Extend without forking: hook templates, a build-time content filter, page-specific styles and scripts, ad slots, and a contact page that posts to Gratilaus Form or any endpoint that accepts the same JSON.

How to Use

  1. Download the ZIP file above, check its SHA-256 hash, and unzip it. Open START_HERE.html in the unzipped folder (gratilaus-site-1.0.0) in your browser: it has the step-by-step quick start and the quick reference, in English and Japanese. The steps below are the short version.
  2. Open a terminal in the unzipped folder, and install Python 3.10 or later. Node.js is needed only for the search index.
  3. Create a virtual environment and install the two packages (Jinja2 and PyYAML):
    python3 -m venv .venv
    . .venv/bin/activate
    pip install -r requirements.txt
    On Windows (Command Prompt), use py -m venv .venv, .venv\Scripts\activate and py -m pip install -r requirements.txt; in PowerShell, activate with .venv\Scripts\Activate.ps1.
  4. Build and preview the sample site, then open http://localhost:8000 in a browser (--no-pagefind skips the search index, so Node.js is not needed):
    python3 scripts/build.py --no-pagefind
    python3 -m http.server -d output 8000
  5. Edit config/site.yaml (site name, base_url, navigation, theme) and replace the sample pages in content/ with your own.
  6. Run python3 scripts/check.py, then publish the output/ folder to any static host. To use Amazon S3 and CloudFront, copy config/deploy.conf.example to config/deploy.conf, fill it in, and run ./scripts/deploy.sh --build --dry-run before the real deploy.

The included README.md (English) and README.ja.md (Japanese) document every setting, including publishing with a manual deployment on AWS Amplify Hosting.

What's in the ZIP File

  • START_HERE.html — open it first: the quick start and the quick reference in your browser, in English and Japanese.
  • QUICKSTART.md, QUICK_REFERENCE.md (and .ja.md) — the same two guides as text.
  • README.md, README.ja.md — the full documentation (English and Japanese).
  • AGENTS.md — instructions for AI coding agents working in the folder: which files to change, the license's credit, and what to leave to you.
  • config/ — site.yaml (the file most sites edit), language overlays, the interface text for each language, a JSON schema for editor completion, and deploy.conf.example for the deploy script.
  • content/ — the sample pages, one folder each, to replace with your own.
  • layout/, page_templates/ — the Jinja2 templates; layout/hooks/ is where your own additions go.
  • assets/ — the stylesheet (and an optional one for HTML imported from an older CMS), the site script, the contact form script, and a placeholder logo and social-sharing image in assets/img/.
  • static_root/ — files copied to the root of the site: the manifest, the service worker, robots.txt, icons.
  • scripts/ — build.py, check.py, deploy.py and its launchers deploy.sh and deploy.cmd.
  • notes/ — a place for your own notes that is never published.
  • CHANGELOG.md, CHANGELOG.ja.md, LICENSE, NOTICE, SECURITY.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, requirements.txt, pyproject.toml (lint settings), editor and Git settings (.editorconfig, .gitattributes, .gitignore), and GitHub Actions workflows (.github/) that run the checks, and can publish the site to GitHub Pages, if you keep your copy on GitHub.

Updating to a New Version

These are yours, and the steps below never overwrite them: config/site.yaml and any config/site.<lang>.yaml, config/env/, config/deploy*.conf, content/, the files you created in layout/hooks/, scripts/content_filters.py if you made one, assets/img/ and your own images, the icons and extra files in static_root/, any language file you added to config/locales/, and notes/. The rest is the project's code, and the extension points above exist so that you do not need to edit it.

  1. Back up your copy (or commit it, if you keep it in Git).
  2. Read the release notes of the new version for settings that changed.
  3. Copy the project's files from the new version over yours file by file: the files in scripts/ (build.py, check.py, deploy.py, deploy.sh, deploy.cmd), the templates in layout/ (not layout/hooks/) and page_templates/, assets/css/main.css and compat-legacy.css, assets/js/site.js and mailform.js, config/site.schema.json, config/locales/en.yaml and ja.yaml, the .j2 files in static_root/, requirements.txt (then run pip install -r requirements.txt again), and .github/workflows/ if you use GitHub. Do not replace whole folders: that would delete your own files in them, such as scripts/content_filters.py. If you edited a project file, merge your changes back in.
  4. Run python3 scripts/check.py, build, and look over the result before you publish it.

Uninstalling

The project installs nothing system-wide: deleting the folder you unzipped (with the virtual environment you created in it) removes it. pip and npx keep download caches in your user profile, which you can clear with their own commands. The deploy script never creates AWS resources: the S3 bucket and CloudFront distribution are yours, to keep or delete in your AWS account.

If you take a site down or move it to another system, first publish a build with features.service_worker: false and leave it online for a while. Browsers that registered the service worker fetch the new /sw.js on their next visit; it deletes its cached pages and unregisters itself. A browser that does not visit again before the site is gone keeps its cached copies, so publish this build as early as you can.

Privacy

The software itself collects nothing about you or your visitors; your web host may keep its own access logs. By default the pages it generates set no cookies, use no analytics and, unless you add a third party on purpose, make no requests to other hosts. Search runs in the visitor's browser from an index stored with the site. The service worker (on by default, features.service_worker) keeps copies of visited pages in the browser's cache so that they load offline. The optional contact page sends what a visitor types to the endpoint you configure; if that is Gratilaus Form, its page explains how that data is handled.

Third-Party Components and Licenses

  • Jinja2 (BSD-3-Clause) and PyYAML (MIT), with their dependencies such as MarkupSafe (BSD-3-Clause) — installed with pip from requirements.txt; not included in the ZIP file.
  • Pagefind (MIT) — optional; fetched with npx when you build with search on. It writes its own files into your site, so a site published with search on redistributes them; the build writes Pagefind's MIT license next to them (pagefind/LICENSE.txt).
  • Simple Icons (CC0 1.0) — the path data of the brand marks on the share buttons (X, Facebook, LINE, LinkedIn, Pinterest, RSS and Feedly).

Everything else in the ZIP file is original work under the Gratilaus Attribution License 1.0. NOTICE lists the details.

About This Project

Many site generators ask you to adopt an ecosystem; this one asks you to copy a folder. The source is about 6,000 lines of Python in three scripts (build, check, deploy), about 1,000 lines of plain JavaScript in two files and one stylesheet organized with @layer, with no generated code and no build toolchain beyond Python.

It is not a good fit if you need comments, user accounts, scheduled publishing or a WYSIWYG editor: those all need a server, and this project deliberately has none.

Important Notes

  • License: the project is licensed under the Gratilaus Attribution License 1.0, which is derived from the Apache License 2.0 and differs from it mainly by an added Section 4A: a website built with it shows a credit, with rules for handing a site over to someone else and for a site that does not comply. Use, modification, redistribution and commercial use are otherwise allowed as under the Apache License 2.0. It is provided "as is", without warranties or conditions of any kind. The full terms are in the LICENSE and NOTICE files in the ZIP file, and the license text is also on this site.
  • Footer credit: sites built from the template show "Built with Gratilaus by H.K." in the footer, where H.K. links to hidekazu-konishi.com. When you publish a site built with it, the license requires a credit that contains "Gratilaus" and "H.K." on every page (error pages and redirect-only pages aside), visible on every screen size and color scheme the page supports without a click or hover, not hidden by your CSS or scripts, no smaller than the smallest other text in the same area, and with a contrast of at least 4.5:1 against its background (WCAG 2.2, 1.4.3), and its link has to reach hidekazu-konishi.com when followed; keeping the default credit does this. You may reword or translate it (keeping "Gratilaus" and "H.K." as they are) and add your own words, but not so that it disparages the software or its author or states or implies that the author endorses, sponsors or is responsible for your site. The rel attribute is your choice: the default is rel="nofollow", and we recommend keeping it. A site needs no credit yet while only the people who build, maintain, test, review or approve it, or only your own employees and contractors, can use it, and it requires signing in, is reachable only through a private network or a VPN, or is marked to be excluded from search engines (noindex or robots.txt); a site offered to the public is published, whatever it is called. If you give a site, or files for it, to someone else, give them the license and tell them about Section 4A: from then on it is theirs to keep (if you do not do both, it stays yours). A site that does not comply is not covered for that site until it complies (the license is not revoked); see NOTICE for the 30- and 60-day rules. The author may also ask you to remove the credit and the exemption link from a particular site; that site then needs neither, and from 30 days after the request the names may be used on it only as Section 6 of the license allows. You may use "Gratilaus", the product names and "H.K." in the credit, in the exemption link and to say truthfully that your site is built with this software, but not as part of the name of your own product or site, or in a way that suggests the author endorses it.
  • Websites built with it: the disclaimer for websites built with it, and what the credit means, are stated under Downloadable Software Disclaimer in the privacy policy.
  • Your AWS account: the deploy script uses your own AWS credentials and an S3 bucket and CloudFront distribution that you create. AWS bills the use of those resources to your account.
  • Platforms: macOS for every release; Linux and Windows on a best-effort basis. This release: also checked on Linux in Ubuntu 26.04 LTS, Ubuntu 24.04 LTS and Debian 13 containers and on Windows 11 (Command Prompt and Windows PowerShell).

Support and Reports

The latest stable release is the supported version. To report a bug or a suggestion, use any of the contact options on hidekazu-konishi.com. Report a security issue privately by email, as described in SECURITY.md in the ZIP file: the address is behind the Email link in the author's profile on the home page.

Getting New Versions

When a new version is released, this page is updated with its release notes, download link and SHA-256 hash, and its entry in this site's Atom and RSS feeds is refreshed. For scripts, releases.json lists each version published here with its release time, download URL and SHA-256 hash.

FAQ

Do I need AWS to use it?
No. The build produces ordinary files that any static host can serve. The deploy script for Amazon S3 and CloudFront is one option, and you can delete it if you publish another way.

Does it need a server or a database?
No. Everything is generated on your computer, and search runs in the reader's browser from an index stored with the site.

Can I build a Japanese site with it?
Yes. Japanese ships with the project alongside English: set site.lang: "ja" in config/site.yaml, or build once with --lang ja.

Can I move an existing site to it without changing its URLs?
Usually. build.url_style chooses between /about/ and /about.html, a page can set its own path, and links written in the other style are retargeted at build time.

Can I remove the footer credit?
Only if your site links to hidekazu-konishi.com elsewhere instead: show a link to https://hidekazu-konishi.com/ whose text is exactly "hidekazu-konishi.com" — or an image link that shows the image given in the license, unaltered and at least 32 by 32 CSS pixels, with alternative text that includes "hidekazu-konishi.com" (you may host your own copy of the image) — visibly, on a page that visitors reach from your home page by following links without signing in. The size and contrast rules of the credit apply to that link too, and it has to work. Any link from the Link Kit on hidekazu-konishi.com/entry/links.html meets this. Then set credit.enabled: false in config/site.yaml. The rel value of that link is your choice too (for example nofollow or sponsored). Section 4A of the license has the exact terms.

Is it open source?
The source code is included, and you may use, modify and redistribute it, including for commercial work. The license has not been submitted to or approved by the Open Source Initiative, so it is not an OSI-approved open source license.

How do I add a contact form?
The template includes a contact page and mailform.js. Point mailform.endpoint in config/site.yaml at Gratilaus Form, which you deploy to your own AWS account, or at any service that accepts the same JSON.

Can I build the site with an AI coding agent?
Yes. The ZIP includes AGENTS.md, an open format for instructions to coding agents that tools such as Codex, GitHub Copilot and Cursor read. Claude Code (v2.1.277 or later) reads it when there is no CLAUDE.md in the folder or a folder above it; if you keep one, put the line @AGENTS.md at its top. Gemini CLI reads it once "AGENTS.md" is added to context.fileName in its settings.json. The file asks the agent to change your settings and content rather than the product's files, to build and run the check before it reports the work done, to tell you before a change would affect the footer credit, and to leave publishing to you.

Does the site it builds help AI assistants read it?
It gives them the files they look for: llms.txt, a short Markdown index of the site (article excerpts and the number of articles listed are settings under llms_txt), JSON-LD for the site and its pages, sitemap.xml and sitemap.txt, and plain HTML that needs no script to read. How an AI service ranks or cites a site is up to that service.

Related Tools

Related Articles


References:
Tech Blog with curated related content
Web Tools Collection

Written by Hidekazu Konishi