Pre-built code blocks

SEO tags, sitemap and legal pages

SEO + metadata + legal generator

For when the answer to “People should find it on Google, and it needs privacy/terms pages” is yes.

Generates canonical/OG/Twitter tags, JSON-LD, sitemap.xml, robots.txt, and privacy/terms pages from the config the site already has — plus a --check that fails the build when launch placeholders remain.

Built by hand again in 9 of 20 audited projects before this existed. Each rebuild was another chance to make the mistake below.

A folded map showing a network of connected nodes with a magnifying glass over one of them, and two upright document sheets beside it each carrying a pressed stamp

Skip the rebuild

You do not write this one. It arrives in your project as ordinary source you can read, change and keep, with its audit record and its caveats beside it.

  1. Download the Playground. It is free and runs on your own machine.
  2. Start a new app and tick “People should find it on Google, and it needs privacy/terms pages”.
  3. This block is written in, along with anything else you ticked.

Download the Playground See the other blocks

The mistake it removes

The single most repetitive hand-written work in the audit (9/20 sites). DD keeps failing sites on the same two mechanical things: placeholders shipping in canonical URLs, and no privacy/terms on a site that takes money.

What is already handled

Each of these was checked by running the code, not by reading it.

What the audit found

Named rather than summarized. The reasoning behind each one ships inside the block, so it travels with the code instead of living on a page you have to trust.

What you still have to do

A copied file cannot own your secrets, your host or your legal obligations. This is the part the block deliberately does not claim.

What lands in your project

python

  • python/seo_kit.py

Import SeoKit, or run as CLI: python3 seo_kit.py --config config.json --out output/ --check. Stdlib only. --pages takes [{path, title, description, image, lastmod}]: path is required, lastmod goes in the sitemap, and title+description (BOTH, or neither) write a meta/<slug>.html head block for you to include in that page. An unknown page key is an ERROR — this generator does not accept a value and then drop it. Choosing each path: Every page URL carries the page's target keyword: lowercase, hyphens, the city for a local page, no dates or ids (`/cape-coral-realtor/`, not `/page2/`, `/2026/09/new-post/` or `/services?id=4`).

What you supply

Licensed MIT. It is a starting point, not a finished product.

Get it

Download the Playground See the other blocks

Nothing here is locked. The files are yours, in your folder, under a permissive license.

Questions

Is SEO tags, sitemap and legal pages audited?
Yes. A full due-diligence audit was run on 2026-07-17 and the verdict was a pass.
What do I still have to do myself?
Serve the generated sitemap.xml and robots.txt at your domain root, and set base_url to the real origin. The generator writes correct files; whether a crawler can fetch them at the expected path is a hosting decision it cannot make.
How do I get this code?
Download the Playground, start a new app, and tick “People should find it on Google, and it needs privacy/terms pages”. The block is written into your project as ordinary source you can read and edit.

All pre-built code blocks · Learn to build from zero · The coding guide