Skip to content

armgit / kwant

Public Imported from GitHub
0

Your own team of AI bots in one self-hosted binary: spaces, every account you have, handoffs, approvals and routines. Open-source, self-hosted alternative to Grok Bot, Claude Duet and OpenAI dots. Rust + React.

site: blog

Pixel (kwant bot)581d963d2daa
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b6eb1607..f126a572 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
## Unreleased
+### Added
+- **kwant.si blog, ready for posts.** `scripts/build_site.py` now builds a blog from Markdown files in
+ `site-src/blog/` (static, no new dependencies, CSP unchanged): `/blog/` lists the posts, each post has
+ breadcrumbs, reading time, related posts and a try-kwant box, plus BlogPosting and breadcrumb JSON-LD,
+ article meta, a sitemap entry and an item in `/blog/feed.xml` (RSS). A `compare` block makes comparison
+ tables that turn into one card per row on phones. Posts marked `draft: yes` are left out everywhere;
+ `--drafts` previews them locally. The Blog link in the header and footer appears with the first published
+ post, so the live site is unchanged until then. `check_site.py` checks blog pages and the feed.
+
### Changed
- **kwant.si covers 0.5.** The home page says "New in 0.5" (bots bring receipts, status dots, smarter
browsing, suggested routines, off by default). The features page has "New in 0.5"
diff --git a/scripts/build_og.py b/scripts/build_og.py
index d753fcc8..7e95b5cf 100644
--- a/scripts/build_og.py
+++ b/scripts/build_og.py
@@ -13,6 +13,8 @@ Each card uses three optional header keys in the page source:
<title> can change without changing the card
card: a short line under the title (falls back to the description's first sentence)
card_art: what sits on the CRT screen: scene (the pixel town), team (every role's avatar) or avatar:ROLE
+Published blog posts (site-src/blog/*.md) get a card too, as does the blog index once there is a post; pass --drafts to
+draw cards for draft posts as well, for a local preview built with build_site.py --drafts.
"""
import pathlib
import sys
@@ -125,7 +127,8 @@ def card(meta):
left, width = 64, 548
y = 168
group = next((g for g, items in site.DOC_GROUPS for s, _ in items if meta.get("nav") == s), None)
- kicker = f"Docs · {group}" if group else ("Every feature" if meta.get("active") == "features" else "")
+ kicker = (f"Docs · {group}" if group else "Every feature" if meta.get("active") == "features"
+ else "Blog" if meta.get("active") == "blog" else "")
if kicker:
draw.text((left, y), kicker.upper(), font=font("inter-var", 21, 700), fill=VIOLET)
y += 44
@@ -181,6 +184,16 @@ def main():
name = slug(meta["path"])
card(meta).save(out / f"{name}.png", optimize=True)
written.append(name)
+ posts = site.blog_posts(drafts="--drafts" in sys.argv[1:])
+ for stale in out.glob("blog-*.png"):
+ stale.unlink()
+ if posts:
+ index = {"path": "blog/index.html", "title": "Blog", "description": site.BLOG_DESC, "active": "blog",
+ "card": "Guides, comparisons and notes on self-hosted AI agents", "card_art": "team"}
+ for meta in [index] + [m for m, _ in posts]:
+ name = slug(meta["path"])
+ card(meta).save(out / f"{name}.png", optimize=True)
+ written.append(name)
print("wrote og:", ", ".join(written), file=sys.stderr)
diff --git a/scripts/build_site.py b/scripts/build_site.py
index 46b9b1b3..c5957079 100644
--- a/scripts/build_site.py
+++ b/scripts/build_site.py
@@ -26,6 +26,12 @@ its title and description, so new pages show up there without extra work.
Each page's og:image is its own card from scripts/build_og.py (site/assets/og/), so run that first when titles or cards change.
lastmod and the docs' dateModified come from the last git commit that changed the page body (today if it's uncommitted).
+The blog: each post is a Markdown file in site-src/blog/ (see BLOG_HELP below for its header keys and what the Markdown
+supports). Posts become blog/<file name>.html, with BlogPosting JSON-LD, a reading time and related posts; the build also
+writes blog/index.html and the RSS feed blog/feed.xml, and adds the posts to the sitemap and llms.txt. A post with
+`draft: yes` is left out of everything; `python3 scripts/build_site.py --drafts` builds drafts too, for a local preview
+only (never commit that build). The Blog link in the header and footer appears once one post is published.
+
It also writes the favicons (favicon.svg, favicon-32.png, apple-touch-icon.png, favicon.ico) from LOGO_RECTS,
so the tab icon is always the header logo.
"""
@@ -36,6 +42,7 @@ import json
import pathlib
import posixpath
import re
+import shutil
import struct
import subprocess
import sys
@@ -243,6 +250,7 @@ def header(root, active):
home = root or "./"
def cur(name):
return ' aria-current="page"' if active == name else ""
+ blog = f' <a href="{root}blog/index.html"{cur("blog")}>Blog</a>\n' if BLOG_LIVE else ""
return f"""<a class="skip" href="#main">Skip to content</a>
<header class="site-header">
@@ -251,7 +259,7 @@ def header(root, active):
<nav class="nav" aria-label="Main">
<a href="{root}features.html"{cur("features")}>Features</a>
<a href="{root}docs/quickstart.html"{cur("docs")}>Docs</a>
- <a class="btn btn-soft" href="{GITHUB}" rel="noopener">{GH_ICON}<span>GitHub</span></a>
+{blog} <a class="btn btn-soft" href="{GITHUB}" rel="noopener">{GH_ICON}<span>GitHub</span></a>
</nav>
</div>
</header>"""
@@ -259,6 +267,7 @@ def header(root, active):
def footer(root):
home = root or "./"
+ blog = f' <a href="{root}blog/index.html">Blog</a>\n' if BLOG_LIVE else ""
return f"""<footer class="site-footer">
<div class="wrap">
<div class="foot-brand">
@@ -272,7 +281,7 @@ def footer(root):
<a href="{root}docs/quickstart.html">Quickstart</a>
<a href="{root}docs/install.html">Install &amp; run</a>
<a href="{root}self-hosted-ai-agents.html">Self-hosted AI agents</a>
- <a href="{root}docs/mcp.html">MCP tools</a>
+{blog} <a href="{root}docs/mcp.html">MCP tools</a>
</nav>
<nav aria-label="Using kwant">
<h2>Using kwant</h2>
@@ -357,8 +366,13 @@ def page_url(path):
return SITE_URL + "/" + path.replace("index.html", "").replace(".html", "")
-def og_image(path):
- """The page's own social card, with a content hash so link previews refresh when it changes. 404 uses the home card."""
+def og_image(path, image=None):
+ """The page's own social card, with a content hash so link previews refresh when it changes. 404 uses the home card.
+ A blog post can name its own image (a path under site/) instead."""
+ if image:
+ if not (OUT / image).is_file():
+ sys.exit(f"{path}: image: {image} is not in site/")
+ return f"{SITE_URL}/{image}?v={file_hash(OUT / image)}"
name = "home" if path in ("index.html", "404.html") else path.removesuffix(".html").replace("/", "-")
card = OUT / f"assets/og/{name}.png"
if not card.exists():
@@ -409,6 +423,24 @@ def structured_data(meta, url, title, image, dates, body=""):
crumbs([("kwant", SITE_URL + "/"), ("Docs", f"{SITE_URL}/docs/quickstart"), (label, url)]),
org,
]
+ elif meta.get("kind") == "post":
+ author = ({"@id": ORG_ID} if meta["author"] == BLOG_AUTHOR else {"@type": "Person", "name": meta["author"]})
+ post = {"@type": "BlogPosting", "@id": url + "#post", "headline": title, "description": meta["description"], "url": url,
+ "mainEntityOfPage": url, "image": image, "inLanguage": "en", "datePublished": meta["date"],
+ "dateModified": meta["updated"], "author": author, "publisher": {"@id": ORG_ID},
+ "wordCount": meta["words"], "isPartOf": {"@id": BLOG_ID}, "about": {"@id": APP_ID}}
+ if meta["tag_list"]:
+ post["keywords"] = meta["tag_list"]
+ graph = [post, crumbs([("kwant", SITE_URL + "/"), ("Blog", f"{SITE_URL}/blog/"), (title, url)]), org]
+ elif meta.get("kind") == "blog":
+ graph = [
+ {"@type": "Blog", "@id": BLOG_ID, "name": BLOG_TITLE, "description": meta["description"], "url": url, "inLanguage": "en",
+ "publisher": {"@id": ORG_ID}, "isPartOf": {"@id": SITE_ID}, "blogPost": [
+ {"@type": "BlogPosting", "@id": page_url(m["path"]) + "#post", "headline": m["title"], "url": page_url(m["path"]),
+ "datePublished": m["date"], "dateModified": m["updated"]} for m in meta["posts"]]},
+ crumbs([("kwant", SITE_URL + "/"), ("Blog", url)]),
+ org,
+ ]
elif path == "404.html":
return ""
else:
@@ -433,14 +465,18 @@ def page(meta, body, root, dates):
is404 = meta["path"] == "404.html"
robots = '<meta name="robots" content="noindex">\n' if is404 else ""
url = page_url(meta["path"])
- image = og_image(meta["path"])
+ image = og_image(meta["path"], meta.get("image"))
card_name = "kwant" if is404 else meta.get("card_title") or title.split(":")[0]
img_alt = html.escape(f"{card_name}: {meta.get('card', meta['description'])}", quote=True)
ftitle = html.escape(full_title, quote=True)
article = (
f'<meta property="article:published_time" content="{dates[0]}">\n<meta property="article:modified_time" content="{dates[1]}">\n'
- if meta.get("nav") else ""
+ if meta.get("nav") or meta.get("kind") == "post" else ""
)
+ if meta.get("kind") == "post":
+ article += "".join(f'<meta property="article:tag" content="{html.escape(t, quote=True)}">\n' for t in meta["tag_list"])
+ if meta.get("kind") in ("post", "blog"):
+ article += f'<link rel="alternate" type="application/rss+xml" title="{BLOG_TITLE}" href="{SITE_URL}/blog/feed.xml">\n'
return f"""<!doctype html>
<html lang="en">
<head>
@@ -451,7 +487,7 @@ def page(meta, body, root, dates):
<meta name="theme-color" content="#f4f1ff">
<meta name="color-scheme" content="light">
{robots}<link rel="canonical" href="{url}">
-<meta property="og:type" content="{"article" if meta.get("nav") else "website"}">
+<meta property="og:type" content="{"article" if meta.get("nav") or meta.get("kind") == "post" else "website"}">
<meta property="og:site_name" content="kwant">
<meta property="og:locale" content="en_US">
<meta property="og:title" content="{ftitle}">
@@ -486,6 +522,306 @@ def page(meta, body, root, dates):
"""
+# ---- Blog ----
+BLOG_SRC = SRC / "blog"
+BLOG_ID = f"{SITE_URL}/blog/#blog"
+BLOG_LIVE = False # set by main() once a post is published: shows the Blog link in the header and footer
+BLOG_AUTHOR = "The kwant team"
+BLOG_TITLE = "kwant blog"
+BLOG_DESC = "Guides, comparisons and notes on running a self-hosted team of AI agents with kwant."
+WORDS_PER_MINUTE = 220
+BLOG_HELP = """A post's header keys (one `key: value` per line, then a line with ---):
+ title, description, date (YYYY-MM-DD) required
+ updated (YYYY-MM-DD) when the post last changed in substance; defaults to date
+ author defaults to "The kwant team"
+ tags comma separated, e.g. comparison, self-hosted; related posts share tags
+ card, card_title, card_art the social card, as for pages (scripts/build_og.py)
+ image a site path (assets/media/x.png) to use as og:image instead of the card
+ draft: yes left out of the site, the sitemap, the feed and llms.txt
+Markdown: ## and ### headings (h2 get an id from their text), paragraphs, - and 1. lists, **bold**, *italic*, `code`,
+[links](url), > quotes, ``` code blocks, | pipe | tables |, and a ```compare block (a comparison table that turns into
+one card per row on phones; first row = column names, yes / no / partial cells get a mark and words). A line that
+starts with < is passed through as HTML, and the page shortcodes ({{root}}, {{shot:…}}, …) work too."""
+
+_SLUG = re.compile(r"[a-z0-9]+(?:-[a-z0-9]+)*")
+MARKS = {"yes": ("✓", "Yes", "yes"), "no": ("✗", "No", "no"), "partial": ("~", "Partly", "partial")}
+
+
+def slugify(text):
+ return re.sub(r"[^a-z0-9]+", "-", html.unescape(re.sub(r"<[^>]+>", "", text)).lower()).strip("-")
+
+
+def md_inline(text):
+ """Inline Markdown to HTML: `code`, [text](url), **bold**, *italic*. Text is escaped; code spans are kept verbatim."""
+ codes = []
+ def keep(m):
+ codes.append(f"<code>{html.escape(m[1], quote=False)}</code>")
+ return f"\x00{len(codes) - 1}\x00"
+ text = re.sub(r"`([^`]+)`", keep, text)
+ text = html.escape(text, quote=False)
+ def link(m):
+ href = m[2]
+ ext = ' rel="noopener"' if re.match(r"https?://", href) and not href.startswith(SITE_URL) else ""
+ return f'<a href="{html.escape(href, quote=True)}"{ext}>{m[1]}</a>'
+ text = re.sub(r"\[([^\]]+)\]\(([^)\s]+)\)", link, text)
+ text = re.sub(r"\*\*(.+?)\*\*", r"<strong>\1</strong>", text)
+ text = re.sub(r"(?<![\w*])\*(?!\s)(.+?)(?<!\s)\*(?![\w*])", r"<em>\1</em>", text)
+ return re.sub(r"\x00(\d+)\x00", lambda m: codes[int(m[1])], text)
+
+
+def _cells(line):
+ return [c.strip() for c in line.strip().strip("|").split("|")]
+
+
+def _is_rule(line):
+ return bool(re.fullmatch(r"\|?\s*:?-{3,}:?\s*(\|\s*:?-{3,}:?\s*)*\|?", line.strip()))
+
+
+def compare_table(lines):
+ """The comparison component: a real table (row headers, column headers, a caption) that CSS turns into one card per
+ row on narrow screens, each cell labelled with its column through data-label."""
+ caption = ""
+ if lines and lines[0].lower().startswith("caption:"):
+ caption = lines.pop(0).split(":", 1)[1].strip()
+ rows = [_cells(l) for l in lines if l.strip() and not _is_rule(l)]
+ if len(rows) < 2 or len(rows[0]) < 3:
+ sys.exit("compare: needs a header row with a first column and at least two products, and one row")
+ head, body = rows[0], rows[1:]
+ def cell(value, label):
+ mark = MARKS.get(value.lower().split(" ", 1)[0].rstrip(".,:;"))
+ if mark:
+ rest = value.split(" ", 1)[1] if " " in value else ""
+ inner = (f'<span class="mark mark-{mark[2]}" aria-hidden="true">{mark[0]}</span> {mark[1]}'
+ + (f" <span class=\"cmp-note\">{md_inline(rest)}</span>" if rest else ""))
+ else:
+ inner = md_inline(value)
+ return f'<td data-label="{html.escape(label, quote=True)}"><span>{inner}</span></td>'
+ out = ['<figure class="compare">', "<table>"]
+ if caption:
+ out.append(f"<caption>{md_inline(caption)}</caption>")
+ out.append("<thead><tr>" + "".join(f'<th scope="col">{md_inline(h)}</th>' for h in head) + "</tr></thead>")
+ out.append("<tbody>")
+ for r in body:
+ r = (r + [""] * len(head))[:len(head)]
+ out.append(f'<tr><th scope="row">{md_inline(r[0])}</th>' + "".join(cell(v, head[i + 1]) for i, v in enumerate(r[1:])) + "</tr>")
+ out += ["</tbody>", "</table>", "</figure>"]
+ return "\n".join(out)
+
+
+def markdown(text):
+ """The small Markdown subset in BLOG_HELP, to HTML. Kept here so the site needs nothing but Python to build."""
+ lines, out, i = text.strip("\n").split("\n"), [], 0
+ para = lambda chunk: f"<p>{md_inline(' '.join(l.strip() for l in chunk))}</p>"
+ while i < len(lines):
+ line = lines[i]
+ if not line.strip():
+ i += 1
+ continue
+ if line.startswith("```"):
+ lang, j = line[3:].strip(), i + 1
+ while j < len(lines) and not lines[j].startswith("```"):
+ j += 1
+ block, i = lines[i + 1:j], j + 1
+ if lang == "compare":
+ out.append(compare_table(block))
+ else:
+ out.append(f"<pre><code>{html.escape(chr(10).join(block), quote=False)}</code></pre>")
+ continue
+ m = re.match(r"(#{1,6})\s+(.*)", line)
+ if m:
+ level = len(m[1])
+ if level < 2:
+ sys.exit(f"markdown: '# {m[2]}': the post's title is its only h1; start headings at ##")
+ body = md_inline(m[2].strip())
+ ident = f' id="{slugify(body)}"' if level <= 3 else ""
+ out.append(f"<h{level}{ident}>{body}</h{level}>")
+ i += 1
+ continue
+ if line.startswith("<"):
+ j = i
+ while j < len(lines) and lines[j].strip():
+ j += 1
+ out.append("\n".join(lines[i:j]))
+ i = j
+ continue
+ if line.lstrip().startswith("|") and i + 1 < len(lines) and _is_rule(lines[i + 1]):
+ j = i
+ while j < len(lines) and lines[j].lstrip().startswith("|"):
+ j += 1
+ rows = [_cells(l) for l in lines[i:j] if not _is_rule(l)]
+ head = "".join(f'<th scope="col">{md_inline(c)}</th>' for c in rows[0])
+ body = "".join("<tr>" + "".join(f"<td>{md_inline(c)}</td>" for c in r) + "</tr>" for r in rows[1:])
+ out.append(f'<div class="table-wrap"><table><thead><tr>{head}</tr></thead><tbody>{body}</tbody></table></div>')
+ i = j
+ continue
+ if line.startswith(">"):
+ j = i
+ while j < len(lines) and lines[j].startswith(">"):
+ j += 1
+ out.append(f"<blockquote>{markdown(chr(10).join(l[1:].lstrip() for l in lines[i:j]))}</blockquote>")
+ i = j
+ continue
+ m = re.match(r"(\s*)([-*]|\d+\.)\s+", line)
+ if m:
+ tag = "ol" if m[2][0].isdigit() else "ul"
+ items, j = [], i
+ while j < len(lines) and lines[j].strip():
+ im = re.match(r"\s*([-*]|\d+\.)\s+(.*)", lines[j])
+ if im and (im[1][0].isdigit()) == (tag == "ol"):
+ items.append([im[2]])
+ elif items:
+ items[-1].append(lines[j].strip())
+ else:
+ break
+ j += 1
+ out.append(f"<{tag}>" + "".join(f"<li>{md_inline(' '.join(it))}</li>" for it in items) + f"</{tag}>")
+ i = j
+ continue
+ j = i
+ while j < len(lines) and lines[j].strip() and not re.match(r"(#{1,6}\s|```|<|>|\s*([-*]|\d+\.)\s)", lines[j]):
+ j += 1
+ out.append(para(lines[i:j]))
+ i = j
+ return "\n".join(out)
+
+
+def reading_minutes(text):
+ words = len(re.findall(r"\w+", re.sub(r"<[^>]+>", " ", text)))
+ return max(1, -(-words // WORDS_PER_MINUTE))
+
+
+def blog_posts(drafts=False):
+ """Every post as (meta, markdown), newest first. Header keys are checked so a typo fails the build, not the page."""
+ posts = []
+ for src in sorted(BLOG_SRC.glob("*.md")) if BLOG_SRC.exists() else []:
+ meta, body = parse(src)
+ slug = src.stem
+ if not _SLUG.fullmatch(slug):
+ sys.exit(f"{src.name}: file names are the URL, so use lowercase words and dashes only")
+ for key in ("title", "description", "date"):
+ if not meta.get(key):
+ sys.exit(f"{src.name}: missing '{key}:'\n{BLOG_HELP}")
+ for key in ("date", "updated"):
+ if meta.get(key):
+ datetime.date.fromisoformat(meta[key])
+ if meta.get("updated", meta["date"]) < meta["date"]:
+ sys.exit(f"{src.name}: updated is before date")
+ if meta.get("draft") == "yes" and not drafts:
+ continue
+ meta.update(path=f"blog/{slug}.html", slug=slug, kind="post", active="blog")
+ meta.setdefault("updated", meta["date"])
+ meta.setdefault("author", BLOG_AUTHOR)
+ meta.setdefault("card_art", "avatar:research")
+ meta["tag_list"] = [t.strip() for t in meta.get("tags", "").split(",") if t.strip()]
+ meta["words"] = len(re.findall(r"\w+", body))
+ meta["minutes"] = reading_minutes(body)
+ posts.append((meta, body))
+ return sorted(posts, key=lambda p: (p[0]["date"], p[0]["slug"]), reverse=True)
+
+
+def related(meta, posts, n=3):
+ """Up to n other posts, most shared tags first, then newest."""
+ tags = set(meta["tag_list"])
+ others = [m for m, _ in posts if m["slug"] != meta["slug"]]
+ scored = sorted(others, key=lambda m: (len(tags & set(m["tag_list"])), m["date"], m["slug"]), reverse=True)
+ return scored[:n]
+
+
+def human_date(iso):
+ d = datetime.date.fromisoformat(iso)
+ return f"{d.strftime('%B')} {d.day}, {d.year}"
+
+
+def post_meta_line(meta):
+ when = f'<time datetime="{meta["date"]}">{human_date(meta["date"])}</time>'
+ if meta["updated"] != meta["date"]:
+ when += f' · Updated <time datetime="{meta["updated"]}">{human_date(meta["updated"])}</time>'
+ return f'{html.escape(meta["author"])} · {when} · {meta["minutes"]} min read'
+
+
+def post_card(m, root, level=2):
+ tags = "".join(f"<li>{html.escape(t)}</li>" for t in m["tag_list"])
+ return (f'<article class="post-card"><h{level}><a href="{root}{m["path"]}">{html.escape(m["title"])}</a></h{level}>'
+ f'<p>{html.escape(m["description"])}</p>'
+ f'<p class="post-meta">{post_meta_line(m)}</p>' + (f'<ul class="tags" aria-label="Tags">{tags}</ul>' if tags else "")
+ + "</article>")
+
+
+def blog_post_body(meta, body, posts, root):
+ tags = ", ".join(meta["tag_list"])
+ rel = related(meta, posts)
+ rel_html = (f'<aside class="related" aria-labelledby="related-title"><h2 id="related-title">Related posts</h2>'
+ f'<div class="post-grid">{"".join(post_card(m, root, 3) for m in rel)}</div></aside>') if rel else ""
+ return f"""<section class="page-head post-head">
+ <div class="wrap">
+ <nav class="crumbs" aria-label="Breadcrumb"><a href="{root}index.html">kwant</a> <span aria-hidden="true">/</span> <a href="{root}blog/index.html">Blog</a></nav>
+ {f'<p class="kicker">{html.escape(tags)}</p>' if tags else ""}
+ <h1>{html.escape(meta["title"])}</h1>
+ <p class="lede">{html.escape(meta["description"])}</p>
+ <p class="post-meta">{post_meta_line(meta)}</p>
+ </div>
+</section>
+
+<div class="wrap">
+ <article class="prose solo post">
+{expand(markdown(body), root)}
+ <aside class="post-cta" aria-label="Try kwant">
+ <p><strong>Try kwant.</strong> A self-hosted team of AI agents in one binary, free and open source.</p>
+ <p class="cta"><a class="btn btn-violet" href="{root}docs/install.html">Install kwant</a> <a class="btn btn-soft" href="{GITHUB}" rel="noopener">See it on GitHub</a></p>
+ </aside>
+ </article>
+ {rel_html}
+</div>
+"""
+
+
+def blog_index_body(posts, root):
+ cards = "".join(post_card(m, root) for m, _ in posts)
+ return f"""<section class="page-head">
+ <div class="wrap">
+ <p class="kicker">Blog</p>
+ <h1>The kwant blog</h1>
+ <p class="lede">{html.escape(BLOG_DESC)} <a href="{root}blog/feed.xml">RSS feed</a></p>
+ </div>
+</section>
+
+<div class="wrap">
+ <div class="post-list">{cards}</div>
+</div>
+"""
+
+
+def rfc822(iso):
+ d = datetime.date.fromisoformat(iso)
+ return datetime.datetime(d.year, d.month, d.day, 8, 0, tzinfo=datetime.timezone.utc).strftime("%a, %d %b %Y %H:%M:%S +0000")
+
+
+def blog_feed(posts):
+ """RSS 2.0 for the blog. Only post dates go in it, so a rebuild with no new posts writes the same bytes."""
+ esc = lambda s: html.escape(s, quote=False)
+ items = []
+ for m, _ in posts:
+ url = page_url(m["path"])
+ cats = "".join(f"<category>{esc(t)}</category>" for t in m["tag_list"])
+ items.append(f" <item><title>{esc(m['title'])}</title><link>{url}</link><guid isPermaLink=\"true\">{url}</guid>"
+ f"<pubDate>{rfc822(m['date'])}</pubDate><description>{esc(m['description'])}</description>{cats}</item>")
+ newest = max(m["updated"] for m, _ in posts)
+ return "\n".join([
+ '<?xml version="1.0" encoding="UTF-8"?>',
+ '<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">',
+ " <channel>",
+ f" <title>{BLOG_TITLE}</title>",
+ f" <link>{SITE_URL}/blog/</link>",
+ f" <description>{esc(BLOG_DESC)}</description>",
+ " <language>en</language>",
+ f" <lastBuildDate>{rfc822(newest)}</lastBuildDate>",
+ f' <atom:link href="{SITE_URL}/blog/feed.xml" rel="self" type="application/rss+xml"/>',
+ *items,
+ " </channel>",
+ "</rss>",
+ ]) + "\n"
+
+
# ---- Cache busting ----
_hashes = {}
@@ -613,11 +949,15 @@ def llms_txt(pages):
line = lambda path: f"- [{pages[path]['title']}]({page_url(path)}): {pages[path]['description']}"
docs = [f"docs/{d}.html" for d, _ in DOCS if f"docs/{d}.html" in pages]
alternatives = sorted(p for p in pages if p.startswith("alternatives/"))
- main = sorted((p for p in pages if p not in docs + alternatives and p not in ("privacy.html", "terms.html", "404.html")), key=lambda p: p != "index.html")
+ blog = ["blog/index.html"] * ("blog/index.html" in pages) + sorted((p for p in pages if p.startswith("blog/") and p != "blog/index.html"),
+ key=lambda p: pages[p]["date"], reverse=True)
+ main = sorted((p for p in pages if p not in docs + alternatives + blog and p not in ("privacy.html", "terms.html", "404.html")), key=lambda p: p != "index.html")
legal = [p for p in ("privacy.html", "terms.html") if p in pages]
out = [LLMS_INTRO, "## Site", *map(line, main), "", "## Docs", *map(line, docs), ""]
if alternatives:
out += ["## Alternatives", *map(line, alternatives), ""]
+ if blog:
+ out += ["## Blog", *map(line, blog), ""]
out += ["## Optional", *map(line, legal)]
return "\n".join(out) + "\n"
@@ -634,10 +974,16 @@ def clean_links(page_html, path):
return re.sub(r'(<a\b[^>]*?\bhref=")((?![a-z]+:|#)[^"#?]*\.html)(#[^"]*)?"', clean, page_html)
-def main():
+def main(argv=None):
+ global BLOG_LIVE
+ argv = sys.argv[1:] if argv is None else argv
write_favicons()
version_css()
written, lastmod, metas = [], {}, {}
+ posts = blog_posts(drafts="--drafts" in argv)
+ BLOG_LIVE = bool(posts)
+ # Every blog file is rebuilt from site-src/blog, so a post that was deleted or turned back into a draft goes away too.
+ shutil.rmtree(OUT / "blog", ignore_errors=True)
for src in sorted(SRC.glob("*.html")):
meta, body = parse(src)
dates = git_dates(src)
@@ -652,6 +998,22 @@ def main():
out.parent.mkdir(parents=True, exist_ok=True)
out.write_text(clean_links(version_urls(page(meta, body, root, dates)), meta["path"]))
written.append(meta["path"])
+ if posts:
+ root = "../"
+ index = {"path": "blog/index.html", "title": "Blog: guides and comparisons for self-hosted AI agents",
+ "card_title": "Blog", "card": "Guides, comparisons and notes on self-hosted AI agents", "card_art": "team",
+ "description": BLOG_DESC, "active": "blog", "kind": "blog", "posts": [m for m, _ in posts]}
+ newest = max(m["updated"] for m, _ in posts)
+ for meta, body in posts:
+ out = OUT / meta["path"]
+ out.parent.mkdir(parents=True, exist_ok=True)
+ out.write_text(clean_links(version_urls(page(meta, blog_post_body(meta, body, posts, root), root, (meta["date"], meta["updated"]))), meta["path"]))
+ lastmod[meta["path"]], metas[meta["path"]] = meta["updated"], meta
+ written.append(meta["path"])
+ (OUT / index["path"]).write_text(clean_links(version_urls(page(index, blog_index_body(posts, root), root, (newest, newest))), index["path"]))
+ lastmod[index["path"]], metas[index["path"]] = newest, index
+ written.append(index["path"])
+ (OUT / "blog/feed.xml").write_text(blog_feed(posts))
urls = [p for p in written if p != "404.html"]
sitemap = ['<?xml version="1.0" encoding="UTF-8"?>', '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">']
for p in urls:
diff --git a/scripts/check_site.py b/scripts/check_site.py
index 9982bdbd..3113fa0e 100644
--- a/scripts/check_site.py
+++ b/scripts/check_site.py
@@ -7,9 +7,14 @@
- title, description, canonical, og:* and twitter:* tags are present; og:image points at an existing 1200x630 card
- JSON-LD parses and every node has an @type; the sitemap lists every indexable page with a lastmod
- 404.html is noindex and not in the sitemap
+ - blog: every published post in site-src/blog is built with BlogPosting and breadcrumb JSON-LD, article meta, a 15-70
+ character title and 50-160 character description, is linked from blog/index.html and listed in the sitemap and in
+ blog/feed.xml (which must parse as RSS); draft posts are nowhere
-Run `python3 scripts/check_site.py` after build_site.py.
+Run `python3 scripts/check_site.py` after build_site.py (`--drafts` after `build_site.py --drafts`, to check drafts too).
"""
+import datetime
+import email.utils
import html.parser
import json
import pathlib
@@ -17,6 +22,7 @@ import re
import struct
import sys
import urllib.parse
+import xml.etree.ElementTree as ET
ROOT = pathlib.Path(__file__).resolve().parent.parent
OUT = ROOT / "site"
@@ -103,7 +109,116 @@ def png_size(path):
return struct.unpack(">II", head[16:24])
+def iso_date(value):
+ try:
+ datetime.date.fromisoformat(value)
+ return True
+ except (TypeError, ValueError):
+ return False
+
+
+def check_blog(errors, sitemap_urls, drafts):
+ """The blog: each published post has its page, BlogPosting and breadcrumb JSON-LD, article meta, a sensible title and
+ description, and is linked from the index, listed in the sitemap and in the feed; drafts appear nowhere."""
+ src = ROOT / "site-src/blog"
+ sources = sorted(src.glob("*.md")) if src.exists() else []
+ draft = lambda f: re.search(r"^draft:\s*yes\s*$", f.read_text().split("\n---\n", 1)[0], re.M)
+ published = [f.stem for f in sources if drafts or not draft(f)]
+ for f in sources:
+ if draft(f) and not drafts:
+ rel = f"blog/{f.stem}.html"
+ if (OUT / rel).exists():
+ errors.append(f"{rel}: draft post was built")
+ if f"{SITE_URL}/blog/{f.stem}" in sitemap_urls:
+ errors.append(f"{rel}: draft post is in sitemap.xml")
+ feed = OUT / "blog/feed.xml"
+ if feed.exists() and f"{SITE_URL}/blog/{f.stem}<" in feed.read_text():
+ errors.append(f"{rel}: draft post is in the feed")
+ built = sorted(p.stem for p in (OUT / "blog").glob("*.html") if p.name != "index.html") if (OUT / "blog").exists() else []
+ for extra in sorted(set(built) - set(published)):
+ errors.append(f"blog/{extra}.html: no published source in site-src/blog")
+ if not published:
+ for name in ("blog/index.html", "blog/feed.xml"):
+ if (OUT / name).exists():
+ errors.append(f"{name}: exists with no published posts")
+ return
+ index = OUT / "blog/index.html"
+ if not index.exists():
+ errors.append("blog/index.html: missing, but there are published posts")
+ return
+ index_html = index.read_text()
+ for slug in published:
+ rel = f"blog/{slug}.html"
+ err = lambda msg: errors.append(f"{rel}: {msg}")
+ page = OUT / rel
+ if not page.exists():
+ err("published post was not built")
+ continue
+ p = Page()
+ p.feed(page.read_text())
+ title, desc = p.title.strip(), p.meta.get("description", "")
+ if not 15 <= len(title) <= 70:
+ err(f"<title> is {len(title)} characters (keep it 15-70 so search results show all of it)")
+ if not 50 <= len(desc) <= 160:
+ err(f"description is {len(desc)} characters (keep it 50-160)")
+ if p.meta.get("og:type") != "article":
+ err("og:type is not article")
+ for key in ("article:published_time", "article:modified_time"):
+ if not iso_date(p.meta.get(key)):
+ err(f"missing or bad {key}")
+ nodes = [n for block in p.jsonld for n in json.loads(block).get("@graph", [])]
+ post = next((n for n in nodes if n.get("@type") == "BlogPosting"), None)
+ if not post:
+ err("no BlogPosting JSON-LD")
+ else:
+ for key in ("headline", "description", "url", "image", "datePublished", "dateModified", "author", "publisher"):
+ if not post.get(key):
+ err(f"BlogPosting has no {key}")
+ if not (iso_date(post.get("datePublished")) and iso_date(post.get("dateModified"))):
+ err("BlogPosting dates are not YYYY-MM-DD")
+ elif post["dateModified"] < post["datePublished"]:
+ err("BlogPosting is modified before it was published")
+ if post.get("url") != p.canonical:
+ err("BlogPosting url differs from canonical")
+ if len(post.get("headline", "")) > 110:
+ err("BlogPosting headline is over 110 characters")
+ crumbs = next((n for n in nodes if n.get("@type") == "BreadcrumbList"), None)
+ if not crumbs or [i.get("name") for i in crumbs.get("itemListElement", [])][:2] != ["kwant", "Blog"]:
+ err("no kwant > Blog breadcrumb JSON-LD")
+ if f'href="/blog/{slug}"' not in index_html:
+ err("not linked from blog/index.html")
+ feed_path = OUT / "blog/feed.xml"
+ if not feed_path.exists():
+ errors.append("blog/feed.xml: missing, but there are published posts")
+ return
+ try:
+ channel = ET.parse(feed_path).getroot().find("channel")
+ except ET.ParseError as e:
+ errors.append(f"blog/feed.xml: does not parse: {e}")
+ return
+ if channel is None or not all(channel.findtext(k) for k in ("title", "link", "description")):
+ errors.append("blog/feed.xml: channel needs title, link and description")
+ return
+ links = []
+ for item in channel.findall("item"):
+ for key in ("title", "link", "guid", "pubDate", "description"):
+ if not item.findtext(key):
+ errors.append(f"blog/feed.xml: item without {key}")
+ try:
+ email.utils.parsedate_to_datetime(item.findtext("pubDate") or "")
+ except (TypeError, ValueError):
+ errors.append(f"blog/feed.xml: bad pubDate {item.findtext('pubDate')}")
+ link = item.findtext("link") or ""
+ links.append(link)
+ if link not in sitemap_urls:
+ errors.append(f"blog/feed.xml: {link} is not in sitemap.xml")
+ for slug in published:
+ if f"{SITE_URL}/blog/{slug}" not in links:
+ errors.append(f"blog/feed.xml: blog/{slug} is missing")
+
+
def main():
+ drafts = "--drafts" in sys.argv[1:]
errors = []
pages = sorted(OUT.rglob("*.html"))
sitemap = (OUT / "sitemap.xml").read_text()
@@ -174,6 +289,7 @@ def main():
target = resolve(OUT / "index.html", url)
if target and not exists(*target):
errors.append(f"sitemap.xml: {url} has no page")
+ check_blog(errors, sitemap_urls, drafts)
robots = (OUT / "robots.txt").read_text()
if f"Sitemap: {SITE_URL}/sitemap.xml" not in robots or "Disallow: /\n" in robots:
errors.append("robots.txt: missing sitemap line or blocks the site")
diff --git a/scripts/test_blog.py b/scripts/test_blog.py
new file mode 100644
index 00000000..68d17cac
--- /dev/null
+++ b/scripts/test_blog.py
@@ -0,0 +1,89 @@
+"""Tests for the blog in build_site.py: the Markdown subset, the comparison table, drafts, reading time, related posts
+and the feed. Run with `python3 -m unittest discover -s scripts -p 'test_*.py'`."""
+import pathlib
+import sys
+import tempfile
+import unittest
+import xml.etree.ElementTree as ET
+
+sys.dont_write_bytecode = True
+sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent))
+import build_site as site # noqa: E402
+
+
+def post(name, date, tags="", draft=False, body="Some words here."):
+ head = f"title: Post {name} title\ndescription: A description for post {name}.\ndate: {date}\ntags: {tags}\n"
+ return head + ("draft: yes\n" if draft else "") + "---\n" + body + "\n"
+
+
+class Markdown(unittest.TestCase):
+ def test_blocks(self):
+ out = site.markdown("## Why it *matters*\n\nA [link](https://example.com) and `<code>`.\n\n- one\n- two\n\n1. a\n2. b\n\n> quoted\n\n```\n<b>x</b>\n```")
+ self.assertIn('<h2 id="why-it-matters">Why it <em>matters</em></h2>', out)
+ self.assertIn('<a href="https://example.com" rel="noopener">link</a>', out)
+ self.assertIn("<code>&lt;code&gt;</code>", out)
+ self.assertIn("<ul><li>one</li><li>two</li></ul>", out)
+ self.assertIn("<ol><li>a</li><li>b</li></ol>", out)
+ self.assertIn("<blockquote><p>quoted</p></blockquote>", out)
+ self.assertIn("<pre><code>&lt;b&gt;x&lt;/b&gt;</code></pre>", out)
+
+ def test_text_is_escaped(self):
+ self.assertIn("&lt;script&gt;", site.md_inline("a <script> tag"))
+
+ def test_h1_is_refused(self):
+ with self.assertRaises(SystemExit):
+ site.markdown("# Title")
+
+ def test_compare_labels_every_cell(self):
+ out = site.markdown("```compare\ncaption: Test\n| Feature | kwant | Other |\n| --- | --- | --- |\n| Self-hosted | yes | partial (paid) |\n| Price | Free | $5 |\n```")
+ self.assertIn("<caption>Test</caption>", out)
+ self.assertIn('<th scope="row">Self-hosted</th>', out)
+ self.assertEqual(out.count('data-label="kwant"'), 2)
+ self.assertEqual(out.count('data-label="Other"'), 2)
+ self.assertIn('aria-hidden="true">✓</span> Yes', out)
+ self.assertIn('Partly <span class="cmp-note">(paid)</span>', out)
+
+ def test_reading_time(self):
+ self.assertEqual(site.reading_minutes("word " * 10), 1)
+ self.assertEqual(site.reading_minutes("word " * (site.WORDS_PER_MINUTE * 2 + 1)), 3)
+
+
+class Posts(unittest.TestCase):
+ def setUp(self):
+ self.dir = tempfile.TemporaryDirectory()
+ self.old = site.BLOG_SRC
+ site.BLOG_SRC = pathlib.Path(self.dir.name)
+ files = {"a.md": post("a", "2026-01-01", "x, y"), "b.md": post("b", "2026-02-01", "y"),
+ "c.md": post("c", "2026-03-01", "z"), "d.md": post("d", "2026-04-01", "x, y", draft=True)}
+ for name, text in files.items():
+ (site.BLOG_SRC / name).write_text(text)
+
+ def tearDown(self):
+ site.BLOG_SRC = self.old
+ self.dir.cleanup()
+
+ def test_drafts_left_out(self):
+ self.assertEqual([m["slug"] for m, _ in site.blog_posts()], ["c", "b", "a"])
+ self.assertEqual([m["slug"] for m, _ in site.blog_posts(drafts=True)], ["d", "c", "b", "a"])
+
+ def test_related_prefers_shared_tags(self):
+ posts = site.blog_posts()
+ a = next(m for m, _ in posts if m["slug"] == "a")
+ self.assertEqual([m["slug"] for m in site.related(a, posts)], ["b", "c"])
+
+ def test_feed_parses_and_is_stable(self):
+ posts = site.blog_posts()
+ feed = site.blog_feed(posts)
+ self.assertEqual(feed, site.blog_feed(site.blog_posts()))
+ items = ET.fromstring(feed).find("channel").findall("item")
+ self.assertEqual([i.findtext("link") for i in items], [f"{site.SITE_URL}/blog/{s}" for s in "cba"])
+ self.assertTrue(all(i.findtext("pubDate") and i.findtext("guid") for i in items))
+
+ def test_missing_title_fails(self):
+ (site.BLOG_SRC / "e.md").write_text("description: x\ndate: 2026-01-01\n---\nbody\n")
+ with self.assertRaises(SystemExit):
+ site.blog_posts()
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/site-src/blog/kwant-vs-other-agent-apps.md b/site-src/blog/kwant-vs-other-agent-apps.md
new file mode 100644
index 00000000..d5464fc9
--- /dev/null
+++ b/site-src/blog/kwant-vs-other-agent-apps.md
@@ -0,0 +1,50 @@
+title: kwant compared with other AI agent apps (placeholder)
+description: A placeholder post that shows every part of a kwant blog post: headings, lists, code, a comparison table and related posts.
+date: 2026-10-31
+author: The kwant team
+tags: comparison, self-hosted
+card: Placeholder: how a kwant blog post looks
+draft: yes
+---
+This post is a **placeholder**. It stays a draft, so it is never published; it exists to show and test how a blog post
+renders. The real posts come from demand research and replace it.
+
+## What a post can hold
+
+Posts are written in Markdown in `site-src/blog/`. A post can have:
+
+- Paragraphs with *emphasis*, **bold** and `inline code`.
+- Links to the [docs]({{root}}docs/quickstart.html) or to [other sites](https://github.com/alexsergivan/kwant).
+- Numbered steps, quotes, code blocks and tables.
+
+### Steps
+
+1. Write the post as `site-src/blog/<name>.md`.
+2. Build with `python3 scripts/build_site.py --drafts` to preview it.
+3. Remove `draft: yes` when it is ready.
+
+> Claims in a comparison must match the products' own docs on the day the post is dated.
+
+## A comparison table
+
+```compare
+caption: Placeholder rows, not a real comparison
+| Feature | kwant | App A | App B |
+| --- | --- | --- | --- |
+| Self-hosted | yes | no | partial (paid plan) |
+| Teams of bots | yes | yes | no |
+| Price | Free | $20/month | $10/month |
+```
+
+## A plain table
+
+| Command | What it does |
+| --- | --- |
+| `kwant` | Starts the app |
+| `kwant --help` | Lists the options |
+
+## Code
+
+```
+python3 scripts/build_site.py --drafts
+```
diff --git a/site/404.html b/site/404.html
index 75916bbe..a9378bd5 100644
--- a/site/404.html
+++ b/site/404.html
@@ -30,7 +30,7 @@
<link rel="apple-touch-icon" href="/apple-touch-icon.png?v=1bc2442f39">
<link rel="preload" href="/assets/fonts/pixelify-sans.woff2?v=66e897e155" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/assets/fonts/inter-var.woff2?v=3100e775e8" as="font" type="font/woff2" crossorigin>
-<link rel="stylesheet" href="/assets/css/site.css?v=35fb38a9df">
+<link rel="stylesheet" href="/assets/css/site.css?v=5d97ad81e6">
</head>
<body class="page-404">
<a class="skip" href="#main">Skip to content</a>
diff --git a/site/alternatives/grok-bot.html b/site/alternatives/grok-bot.html
index 57dafc35..a1d097a4 100644
--- a/site/alternatives/grok-bot.html
+++ b/site/alternatives/grok-bot.html
@@ -29,7 +29,7 @@
<link rel="apple-touch-icon" href="../apple-touch-icon.png?v=1bc2442f39">
<link rel="preload" href="../assets/fonts/pixelify-sans.woff2?v=66e897e155" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="../assets/fonts/inter-var.woff2?v=3100e775e8" as="font" type="font/woff2" crossorigin>
-<link rel="stylesheet" href="../assets/css/site.css?v=35fb38a9df">
+<link rel="stylesheet" href="../assets/css/site.css?v=5d97ad81e6">
</head>
<body class="page-alternatives">
<a class="skip" href="#main">Skip to content</a>
diff --git a/site/assets/css/site.css b/site/assets/css/site.css
index 4ee30024..efab0235 100644
--- a/site/assets/css/site.css
+++ b/site/assets/css/site.css
@@ -343,6 +343,45 @@ td code { white-space: nowrap; }
.pager small { display: block; color: var(--dim); font: 500 13px var(--sans); margin-bottom: 4px; }
.pager .next { text-align: right; grid-column: 2; }
+/* Blog */
+.crumbs { margin-bottom: 18px; color: var(--dim); font-size: 14px; }
+.crumbs a { color: var(--muted); }
+.post-head h1 { font-size: clamp(34px, 4.6vw, 54px); max-width: 860px; }
+.post-meta { margin-top: 14px; color: var(--dim); font-size: 14px; }
+.post-head .post-meta { margin-top: 18px; }
+.post { max-width: 760px; }
+.post > p:first-child { margin-top: 0; }
+.prose blockquote { margin: 24px 0 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--v7); color: var(--muted); }
+.prose blockquote p { margin-top: 8px; color: inherit; }
+.post-cta { margin-top: 56px; padding: 22px 24px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
+.post-cta p { margin: 0; }
+.post-cta .cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
+.post-list, .post-grid { display: grid; gap: 16px; padding-bottom: 96px; }
+.post-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); padding-bottom: 0; }
+.post-card { padding: 22px 24px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
+.post-card h2, .post-card h3 { font: 600 21px/1.3 var(--sans); letter-spacing: -0.01em; }
+.post-card h3 { font-size: 18px; }
+.post-card h2 a, .post-card h3 a { color: var(--ink); text-decoration: none; }
+.post-card h2 a:hover, .post-card h3 a:hover { color: var(--v4); text-decoration: underline; }
+.post-card > p:not(.post-meta) { margin-top: 8px; color: var(--muted); font-size: 16px; }
+.post-card .post-meta { margin-top: 10px; }
+.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
+.tags li { padding: 2px 10px; background: var(--v9); border: 1px solid var(--line); border-radius: 999px; color: var(--v4); font-size: 13px; }
+.related { max-width: 1000px; padding: 0 0 96px; }
+.related h2 { margin-bottom: 20px; font-size: clamp(24px, 2.4vw, 30px); }
+/* The comparison component: a table on wide screens, one card per row on phones, each cell labelled from data-label. */
+.compare, .prose .compare { margin: 28px 0 0; overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
+.compare caption { padding: 12px 14px; caption-side: top; text-align: left; color: var(--dim); font-size: 14px; border-bottom: 1px solid var(--line); }
+.compare thead th:first-child { width: 28%; }
+.compare tbody th { background: none; white-space: normal; font: 600 15px var(--sans); }
+.compare td { min-width: 120px; }
+.compare tbody tr:last-child th { border-bottom: 0; }
+.mark { display: inline-block; width: 1.2em; font-weight: 700; text-align: center; }
+.mark-yes { color: #1f8a46; }
+.mark-no { color: #b42346; }
+.mark-partial { color: #8a6400; }
+.cmp-note { color: var(--dim); font-size: 14px; }
+
/* Smaller screens */
@media (max-width: 1000px) {
.new-strip .wrap { flex-direction: column; align-items: stretch; gap: 12px; }
@@ -375,6 +414,17 @@ td code { white-space: nowrap; }
.grid.two, .tiles { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
+ .compare, .prose .compare { overflow: visible; background: none; border: 0; border-radius: 0; }
+ .compare caption { display: block; padding: 0 0 2px; border: 0; }
+ .compare table, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto; }
+ .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
+ .compare tr { margin-top: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
+ .compare tbody th { padding: 12px 14px; background: var(--v9); border-bottom: 1px solid var(--line); }
+ .compare td { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px; min-width: 0; }
+ .compare tr td:last-child { border-bottom: 0; }
+ .compare td::before { content: attr(data-label); color: var(--dim); font-weight: 600; font-size: 14px; }
+ .post-cta, .post-card { padding: 18px; }
+ .post-list, .related { padding-bottom: 72px; }
.new-list { grid-template-columns: 1fr; gap: 8px; }
section.new-strip { margin-top: -24px; padding: 0 0 24px; }
body { font-size: 16px; }
@@ -424,6 +474,14 @@ td code { white-space: nowrap; }
.pager { grid-template-columns: minmax(0, 1fr); }
.pager .next { grid-column: 1; }
}
+/* The smallest phones: room for a fourth header link */
+@media (max-width: 400px) {
+ .site-header .wrap { width: calc(100% - 28px); }
+ .brand { font-size: 23px; gap: 6px; }
+ .brand svg { width: 32px; height: 32px; }
+ .nav a:not(.btn) { padding: 8px 6px; }
+ .nav .btn { padding: 0 10px; }
+}
@media (prefers-reduced-motion: no-preference) {
html:has(.jump-bar) { scroll-behavior: smooth; }
}
diff --git a/site/docs/accounts.html b/site/docs/accounts.html
index f21e746e..d5812516 100644
--- a/site/docs/accounts.html
+++ b/site/docs/accounts.html
@@ -31,7 +31,7 @@
<link rel="apple-touch-icon" href="../apple-touch-icon.png?v=1bc2442f39">
<link rel="preload" href="../assets/fonts/pixelify-sans.woff2?v=66e897e155" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="../assets/fonts/inter-var.woff2?v=3100e775e8" as="font" type="font/woff2" crossorigin>
-<link rel="stylesheet" href="../assets/css/site.css?v=35fb38a9df">
+<link rel="stylesheet" href="../assets/css/site.css?v=5d97ad81e6">
</head>
<body class="page-docs">
<a class="skip" href="#main">Skip to content</a>
diff --git a/site/docs/approvals.html b/site/docs/approvals.html
index b1b650de..244465e7 100644
--- a/site/docs/approvals.html
+++ b/site/docs/approvals.html
@@ -31,7 +31,7 @@
<link rel="apple-touch-icon" href="../apple-touch-icon.png?v=1bc2442f39">
<link rel="preload" href="../assets/fonts/pixelify-sans.woff2?v=66e897e155" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="../assets/fonts/inter-var.woff2?v=3100e775e8" as="font" type="font/woff2" crossorigin>
-<link rel="stylesheet" href="../assets/css/site.css?v=35fb38a9df">
+<link rel="stylesheet" href="../assets/css/site.css?v=5d97ad81e6">
</head>
<body class="page-docs">
<a class="skip" href="#main">Skip to content</a>
diff --git a/site/docs/bots-and-teams.html b/site/docs/bots-and-teams.html
index 4b09a564..1c1297c8 100644
--- a/site/docs/bots-and-teams.html
+++ b/site/docs/bots-and-teams.html
@@ -31,7 +31,7 @@
<link rel="apple-touch-icon" href="../apple-touch-icon.png?v=1bc2442f39">
<link rel="preload" href="../assets/fonts/pixelify-sans.woff2?v=66e897e155" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="../assets/fonts/inter-var.woff2?v=3100e775e8" as="font" type="font/woff2" crossorigin>
-<link rel="stylesheet" href="../assets/css/site.css?v=35fb38a9df">
+<link rel="stylesheet" href="../assets/css/site.css?v=5d97ad81e6">
</head>
<body class="page-docs">
<a class="skip" href="#main">Skip to content</a>
diff --git a/site/docs/browser.html b/site/docs/browser.html
index 66bc817f..eca8efc6 100644
--- a/site/docs/browser.html
+++ b/site/docs/browser.html
@@ -31,7 +31,7 @@
<link rel="apple-touch-icon" href="../apple-touch-icon.png?v=1bc2442f39">
<link rel="preload" href="../assets/fonts/pixelify-sans.woff2?v=66e897e155" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="../assets/fonts/inter-var.woff2?v=3100e775e8" as="font" type="font/woff2" crossorigin>
-<link rel="stylesheet" href="../assets/css/site.css?v=35fb38a9df">
+<link rel="stylesheet" href="../assets/css/site.css?v=5d97ad81e6">
</head>
<body class="page-docs">
<a class="skip" href="#main">Skip to content</a>
diff --git a/site/docs/flight-school.html b/site/docs/flight-school.html
index 098e79da..a9e01949 100644
--- a/site/docs/flight-school.html
+++ b/site/docs/flight-school.html
@@ -31,7 +31,7 @@
<link rel="apple-touch-icon" href="../apple-touch-icon.png?v=1bc2442f39">
<link rel="preload" href="../assets/fonts/pixelify-sans.woff2?v=66e897e155" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="../assets/fonts/inter-var.woff2?v=3100e775e8" as="font" type="font/woff2" crossorigin>
-<link rel="stylesheet" href="../assets/css/site.css?v=35fb38a9df">
+<link rel="stylesheet" href="../assets/css/site.css?v=5d97ad81e6">
</head>
<body class="page-docs">
<a class="skip" href="#main">Skip to content</a>
diff --git a/site/docs/install.html b/site/docs/install.html
index aa4dba95..ccc835b3 100644
--- a/site/docs/install.html
+++ b/site/docs/install.html
@@ -31,7 +31,7 @@
<link rel="apple-touch-icon" href="../apple-touch-icon.png?v=1bc2442f39">
<link rel="preload" href="../assets/fonts/pixelify-sans.woff2?v=66e897e155" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="../assets/fonts/inter-var.woff2?v=3100e775e8" as="font" type="font/woff2" crossorigin>
-<link rel="stylesheet" href="../assets/css/site.css?v=35fb38a9df">
+<link rel="stylesheet" href="../assets/css/site.css?v=5d97ad81e6">
</head>
<body class="page-docs">
<a class="skip" href="#main">Skip to content</a>
diff --git a/site/docs/loose-ends.html b/site/docs/loose-ends.html
index 41b7ac4a..0a1393dc 100644
--- a/site/docs/loose-ends.html
+++ b/site/docs/loose-ends.html
@@ -31,7 +31,7 @@
<link rel="apple-touch-icon" href="../apple-touch-icon.png?v=1bc2442f39">
<link rel="preload" href="../assets/fonts/pixelify-sans.woff2?v=66e897e155" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="../assets/fonts/inter-var.woff2?v=3100e775e8" as="font" type="font/woff2" crossorigin>
-<link rel="stylesheet" href="../assets/css/site.css?v=35fb38a9df">
+<link rel="stylesheet" href="../assets/css/site.css?v=5d97ad81e6">
</head>
<body class="page-docs">
<a class="skip" href="#main">Skip to content</a>
diff --git a/site/docs/mcp.html b/site/docs/mcp.html
index 6d9f050c..f6164298 100644
--- a/site/docs/mcp.html
+++ b/site/docs/mcp.html
@@ -31,7 +31,7 @@
<link rel="apple-touch-icon" href="../apple-touch-icon.png?v=1bc2442f39">
<link rel="preload" href="../assets/fonts/pixelify-sans.woff2?v=66e897e155" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="../assets/fonts/inter-var.woff2?v=3100e775e8" as="font" type="font/woff2" crossorigin>
-<link rel="stylesheet" href="../assets/css/site.css?v=35fb38a9df">
+<link rel="stylesheet" href="../assets/css/site.css?v=5d97ad81e6">
</head>
<body class="page-docs">
<a class="skip" href="#main">Skip to content</a>
diff --git a/site/docs/memory-skills.html b/site/docs/memory-skills.html
index 7b93de28..8953699b 100644
--- a/site/docs/memory-skills.html
+++ b/site/docs/memory-skills.html
@@ -31,7 +31,7 @@
<link rel="apple-touch-icon" href="../apple-touch-icon.png?v=1bc2442f39">
<link rel="preload" href="../assets/fonts/pixelify-sans.woff2?v=66e897e155" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="../assets/fonts/inter-var.woff2?v=3100e775e8" as="font" type="font/woff2" crossorigin>
-<link rel="stylesheet" href="../assets/css/site.css?v=35fb38a9df">
+<link rel="stylesheet" href="../assets/css/site.css?v=5d97ad81e6">
</head>
<body class="page-docs">
<a class="skip" href="#main">Skip to content</a>
diff --git a/site/docs/mission-board.html b/site/docs/mission-board.html
index 2d0326ee..21571fbf 100644
--- a/site/docs/mission-board.html
+++ b/site/docs/mission-board.html
@@ -31,7 +31,7 @@
<link rel="apple-touch-icon" href="../apple-touch-icon.png?v=1bc2442f39">
<link rel="preload" href="../assets/fonts/pixelify-sans.woff2?v=66e897e155" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="../assets/fonts/inter-var.woff2?v=3100e775e8" as="font" type="font/woff2" crossorigin>
-<link rel="stylesheet" href="../assets/css/site.css?v=35fb38a9df">
+<link rel="stylesheet" href="../assets/css/site.css?v=5d97ad81e6">
</head>
<body class="page-docs">
<a class="skip" href="#main">Skip to content</a>
diff --git a/site/docs/models.html b/site/docs/models.html
index 52e92c5d..78af1a7f 100644
--- a/site/docs/models.html
+++ b/site/docs/models.html
@@ -31,7 +31,7 @@
<link rel="apple-touch-icon" href="../apple-touch-icon.png?v=1bc2442f39">
<link rel="preload" href="../assets/fonts/pixelify-sans.woff2?v=66e897e155" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="../assets/fonts/inter-var.woff2?v=3100e775e8" as="font" type="font/woff2" crossorigin>
-<link rel="stylesheet" href="../assets/css/site.css?v=35fb38a9df">
+<link rel="stylesheet" href="../assets/css/site.css?v=5d97ad81e6">
</head>
<body class="page-docs">
<a class="skip" href="#main">Skip to content</a>
diff --git a/site/docs/parallel-universe.html b/site/docs/parallel-universe.html
index 96bd1636..167d6579 100644
--- a/site/docs/parallel-universe.html
+++ b/site/docs/parallel-universe.html
@@ -31,7 +31,7 @@
<link rel="apple-touch-icon" href="../apple-touch-icon.png?v=1bc2442f39">
<link rel="preload" href="../assets/fonts/pixelify-sans.woff2?v=66e897e155" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="../assets/fonts/inter-var.woff2?v=3100e775e8" as="font" type="font/woff2" crossorigin>
-<link rel="stylesheet" href="../assets/css/site.css?v=35fb38a9df">
+<link rel="stylesheet" href="../assets/css/site.css?v=5d97ad81e6">
</head>
<body class="page-docs">
<a class="skip" href="#main">Skip to content</a>
diff --git a/site/docs/quickstart.html b/site/docs/quickstart.html
index 72b2f83e..11fae34e 100644
--- a/site/docs/quickstart.html
+++ b/site/docs/quickstart.html
@@ -31,7 +31,7 @@
<link rel="apple-touch-icon" href="../apple-touch-icon.png?v=1bc2442f39">
<link rel="preload" href="../assets/fonts/pixelify-sans.woff2?v=66e897e155" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="../assets/fonts/inter-var.woff2?v=3100e775e8" as="font" type="font/woff2" crossorigin>
-<link rel="stylesheet" href="../assets/css/site.css?v=35fb38a9df">
+<link rel="stylesheet" href="../assets/css/site.css?v=5d97ad81e6">
</head>
<body class="page-docs">
<a class="skip" href="#main">Skip to content</a>
diff --git a/site/docs/routines.html b/site/docs/routines.html
index f80ef3d0..8b8f79c2 100644
--- a/site/docs/routines.html
+++ b/site/docs/routines.html
@@ -31,7 +31,7 @@
<link rel="apple-touch-icon" href="../apple-touch-icon.png?v=1bc2442f39">
<link rel="preload" href="../assets/fonts/pixelify-sans.woff2?v=66e897e155" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="../assets/fonts/inter-var.woff2?v=3100e775e8" as="font" type="font/woff2" crossorigin>
-<link rel="stylesheet" href="../assets/css/site.css?v=35fb38a9df">
+<link rel="stylesheet" href="../assets/css/site.css?v=5d97ad81e6">
</head>
<body class="page-docs">
<a class="skip" href="#main">Skip to content</a>
diff --git a/site/docs/spaces.html b/site/docs/spaces.html
index 00f00f4a..93d4b1fe 100644
--- a/site/docs/spaces.html
+++ b/site/docs/spaces.html
@@ -31,7 +31,7 @@
<link rel="apple-touch-icon" href="../apple-touch-icon.png?v=1bc2442f39">
<link rel="preload" href="../assets/fonts/pixelify-sans.woff2?v=66e897e155" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="../assets/fonts/inter-var.woff2?v=3100e775e8" as="font" type="font/woff2" crossorigin>
-<link rel="stylesheet" href="../assets/css/site.css?v=35fb38a9df">
+<link rel="stylesheet" href="../assets/css/site.css?v=5d97ad81e6">
</head>
<body class="page-docs">
<a class="skip" href="#main">Skip to content</a>
diff --git a/site/features.html b/site/features.html
index 2bce9a79..cdfbf9b5 100644
--- a/site/features.html
+++ b/site/features.html
@@ -29,7 +29,7 @@
<link rel="apple-touch-icon" href="apple-touch-icon.png?v=1bc2442f39">
<link rel="preload" href="assets/fonts/pixelify-sans.woff2?v=66e897e155" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="assets/fonts/inter-var.woff2?v=3100e775e8" as="font" type="font/woff2" crossorigin>
-<link rel="stylesheet" href="assets/css/site.css?v=35fb38a9df">
+<link rel="stylesheet" href="assets/css/site.css?v=5d97ad81e6">
</head>
<body class="page-features">
<a class="skip" href="#main">Skip to content</a>
diff --git a/site/index.html b/site/index.html
index 8e9eff36..664f3884 100644
--- a/site/index.html
+++ b/site/index.html
@@ -29,7 +29,7 @@
<link rel="apple-touch-icon" href="apple-touch-icon.png?v=1bc2442f39">
<link rel="preload" href="assets/fonts/pixelify-sans.woff2?v=66e897e155" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="assets/fonts/inter-var.woff2?v=3100e775e8" as="font" type="font/woff2" crossorigin>
-<link rel="stylesheet" href="assets/css/site.css?v=35fb38a9df">
+<link rel="stylesheet" href="assets/css/site.css?v=5d97ad81e6">
</head>
<body class="page-home">
<a class="skip" href="#main">Skip to content</a>
diff --git a/site/privacy.html b/site/privacy.html
index 9ecd0697..f8160c47 100644
--- a/site/privacy.html
+++ b/site/privacy.html
@@ -29,7 +29,7 @@
<link rel="apple-touch-icon" href="apple-touch-icon.png?v=1bc2442f39">
<link rel="preload" href="assets/fonts/pixelify-sans.woff2?v=66e897e155" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="assets/fonts/inter-var.woff2?v=3100e775e8" as="font" type="font/woff2" crossorigin>
-<link rel="stylesheet" href="assets/css/site.css?v=35fb38a9df">
+<link rel="stylesheet" href="assets/css/site.css?v=5d97ad81e6">
</head>
<body class="page-legal">
<a class="skip" href="#main">Skip to content</a>
diff --git a/site/self-hosted-ai-agents.html b/site/self-hosted-ai-agents.html
index 9c94cde3..f8b1b63e 100644
--- a/site/self-hosted-ai-agents.html
+++ b/site/self-hosted-ai-agents.html
@@ -29,7 +29,7 @@
<link rel="apple-touch-icon" href="apple-touch-icon.png?v=1bc2442f39">
<link rel="preload" href="assets/fonts/pixelify-sans.woff2?v=66e897e155" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="assets/fonts/inter-var.woff2?v=3100e775e8" as="font" type="font/woff2" crossorigin>
-<link rel="stylesheet" href="assets/css/site.css?v=35fb38a9df">
+<link rel="stylesheet" href="assets/css/site.css?v=5d97ad81e6">
</head>
<body class="page-guide">
<a class="skip" href="#main">Skip to content</a>
diff --git a/site/terms.html b/site/terms.html
index 84a3e248..884cc275 100644
--- a/site/terms.html
+++ b/site/terms.html
@@ -29,7 +29,7 @@
<link rel="apple-touch-icon" href="apple-touch-icon.png?v=1bc2442f39">
<link rel="preload" href="assets/fonts/pixelify-sans.woff2?v=66e897e155" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="assets/fonts/inter-var.woff2?v=3100e775e8" as="font" type="font/woff2" crossorigin>
-<link rel="stylesheet" href="assets/css/site.css?v=35fb38a9df">
+<link rel="stylesheet" href="assets/css/site.css?v=5d97ad81e6">
</head>
<body class="page-legal">
<a class="skip" href="#main">Skip to content</a>