A docs site is a folder of Markdown and one YAML file. This page lists every
block a page can use: the Markdown you write, then the block as this site
draws it. Pages that aiui build publishes also exist as plain Markdown
aiui build
(/docs/<page>.md, components converted) and in llms.txt, so assistants
/docs/<page>.md
llms.txt
read the same content (AI-ready docs).
site.theme.preset picks the colours. paper is the look of this site: warm
site.theme.preset
paper
paper, a navy accent, serif titles, 17px text on a 1.7 line height and a
measure of about 75 characters. mode: system follows the reader's OS.
mode: system
The other presets and what each changes are in Theming.
YAML at the top of a page sets its title in the sidebar, the browser tab and
search results, and its description for search engines and llms.txt. Every
key is optional, and the common MDX page metadata keys work as they are.
| Key | Type | What it does |
|---|---|---|
| title | string | The page title: the # heading when the body has none, the browser tab, search, llms.txt. Default: the first # heading, else the file name. |
title
#
| description | string | Shown under the title (unless the first paragraph already says it), and the meta description, llms.txt and search snippet. Default: the first paragraph, for those but not shown again. |
description
| sidebarTitle (or nav_title) | string | A shorter label in the sidebar. |
sidebarTitle
nav_title
| icon | string | Before the sidebar label: a lucide name (rocket, terminal, book-open, …), an emoji, or an image URL (https://… or /icons/x.svg). |
icon
rocket
terminal
book-open
https://…
/icons/x.svg
| tag | string | A badge after the sidebar label, such as NEW or BETA. |
tag
NEW
BETA
| deprecated | true/false | true: a Deprecated badge, the label struck through, and a notice above the page. |
deprecated
true
false
Deprecated
| mode | string | wide: no "On this page", a wider column. center: no sidebar either. custom: only the article, full width (no breadcrumb, footer or pager). frame: custom with the sidebar. assistant: the page's text, then Ask AI under it. |
mode
wide
center
custom
frame
assistant
| url | string | An https:// URL makes the page a sidebar link that opens that site in a new tab. The page itself is not published (no route, sitemap, llms.txt or search entry). |
url
https://
| hideFooterPagination | true/false | true: no previous / next links under the page. |
hideFooterPagination
| noAnchor | true/false | true: no copy-link icon on the page's headings. |
noAnchor
| order | number | Position inside its folder (default: a number prefix such as 01-). |
order
01-
| hidden | true/false | Routable, but not in the sidebar, pager or indexes (Navigation). |
hidden
| noindex | true/false | Tells search engines not to index the page (and leaves it out of the sitemap). |
noindex
| searchable | true/false | false leaves the page out of the site's own search. |
searchable
| keywords | list of words, or one comma-separated string | Extra search terms, matched but never shown; also the keywords meta tag and JSON-LD. |
keywords
| canonical | string | The page's canonical URL (and og:url), for a page whose original lives elsewhere. |
canonical
og:url
| robots | string | The robots meta, such as noindex, nofollow; a value with noindex also leaves the page out of the sitemap, llms.txt and search. |
robots
noindex, nofollow
| og:*, twitter:*, article:* | string | That head tag for this page (quote the key: 'og:image': /images/card.png); see SEO. |
og:*
twitter:*
article:*
'og:image': /images/card.png
| boost | number | Search ranking weight (2 ranks the page higher). |
boost
2
| openapi | string | "GET /users", "spec.yaml POST /users" or "webhook name": the page shows that operation, its endpoint bar, Try it, fields and examples around your text (OpenAPI). |
openapi
"GET /users"
"spec.yaml POST /users"
"webhook name"
| api | string | "POST /v1/users": an endpoint page without a spec, Try it from the page's <ParamField>s (OpenAPI). |
api
"POST /v1/users"
<ParamField>
| playground | string | interactive, simple, none or auth: the Try-it display of an openapi: or api: page; site-wide: api.playground.display (OpenAPI). |
playground
interactive
simple
none
auth
openapi:
api:
api.playground.display
| timestamp | true/false | Turns the "Last updated" date off or on for this page (see Page footer). |
timestamp
| lastUpdatedDate | date (2026-05-01) | The "Last updated" date, instead of the last commit's. |
lastUpdatedDate
2026-05-01
| related | list of pages or URLs, or false | The "Related pages" under this page, instead of the suggested ones; false shows none (Related pages). |
related
| pageActions | list of page actions, or false | This page's page actions menu, in order, instead of the site's; false shows none (Page actions). |
pageActions
| rss | true/false | true on a changelog page: the build writes its <Update> entries as an RSS feed at <page>/rss.xml and links it (Changelog). |
rss
<Update>
<page>/rss.xml
| public | true/false | On a site with sign-in: true opens the page to everyone, false keeps it behind sign-in when a public pattern would open it. |
public
| groups | list of group names, or one name | On a site with sign-in: only readers in one of these groups can read the page; to everyone else it does not exist. |
groups
| layout, hero, features | | The docs home page (Home page layout). |
layout
hero
features
| any other key | string, number or true/false | Custom data, such as product: cloud: a data-fm-product="cloud" attribute on the article (for CSS) and meta in the aiui:content-loaded event (for custom JS). |
product: cloud
data-fm-product="cloud"
meta
aiui:content-loaded
The front matter never shows on the page as text.
aiui validate checks these types and reports the line of a wrong one
aiui validate
(hidden: "yes" is a string, so the page would stay in the sidebar), front
hidden: "yes"
matter that is not valid YAML, images without alt text, two files that publish
the same page, two sidebar entries with the same title in one folder, headings
that skip a level, empty pages and a theme.accent with too little contrast.
theme.accent
Each finding names file:line and how to fix it; --strict makes them errors
file:line
--strict
for CI. See the codes.
A nav group can also list a link among its pages:
## and ### headings build the "On this page" list beside the article
##
###
(above it on narrow screens), which follows the reader as they scroll. Every
heading gets an id from its text, so writing-docs#callouts links straight to
writing-docs#callouts
a section, and a link with a section opens the page scrolled to it. Hover a
heading (on a phone, look beside it) for its link icon: one click puts the
section in the address bar and copies its URL. Keep one # title per page; the paragraph right under it is the
lede and reads larger.
To pin an anchor that survives a reworded title, end the heading with {#id}:
{#id}
## Install the CLI {#install} links as #install, the search index uses the
## Install the CLI {#install}
#install
same id, and the braces never show.
Use a callout for what a reader must not miss. Each tag sets the colour and
the icon: <Note> and <Info> (blue), <Tip> and <Check> (green),
<Note>
<Info>
<Tip>
<Check>
<Warning> (amber), <Danger> (red). A title is optional. A tag can sit on
<Warning>
<Danger>
lines of its own or share one with its text: <Note>Saved.</Note> works (see
<Note>Saved.</Note>
Component tags).
<Note title="Run the build first">
aiui serve serves the output of aiui build.
aiui serve
</Note>
mode: system follows the reader's light or dark setting.
</Tip>
The site rebuilt without warnings.
</Check>
<Warning title="Pinned versions">
Plugins built for SDK 1 keep working; check aiui plugins doctor after an upgrade.
aiui plugins doctor
</Warning>
Never put an API key in aiui.yaml; it ships with the site.
aiui.yaml
</Danger>
Pages written for MkDocs keep working: !!! note "Title" with an indented
!!! note "Title"
body draws the same callout (note, info, tip, success, warning,
note
info
tip
success
warning
danger and the other MkDocs types).
danger
For a procedure the reader follows in order. Each step gets a number on a
rail; its body is ordinary Markdown, code blocks included.
pip install aiui
<Steps>
<Step title="Install">
</Step>
<Step title="Write app.py">
Reply to every message with @aiui.reply.
@aiui.reply
<Step title="Run it">
aiui run app.py, then open the address it prints.
aiui run app.py
</Steps>
Options: titleSize="h2" (or h3, h4) on <Steps> or one <Step> makes
titleSize="h2"
h3
h4
<Step>
the titles real headings, so they appear in "On this page" and get a link;
stepNumber={n} restarts the count at n; icon="terminal" draws an icon
stepNumber={n}
n
icon="terminal"
in the circle instead of the number; id="…" names the step for a link.
id="…"
<Steps titleSize="h3">
<Step title="Install the package" icon="terminal">
<Step title="Start the server" stepNumber={3}>
<Accordion> hides detail the reader opens on demand: long output, edge
<Accordion>
cases, FAQs. defaultOpen starts it open. Wrap several in <AccordionGroup>
defaultOpen
<AccordionGroup>
to stack them as one list.
<Accordion title="Why does the site show the old page after a deploy?">
The entry files keep fixed names; aiui build adds a content hash to their
URLs, so a hard refresh is never needed.
</Accordion>
<Accordion title="Can I host the site on GitHub Pages?" defaultOpen>
Yes. See Deploy to GitHub Pages.
</AccordionGroup>
description="…" adds a line under the title, icon="code" an icon before
description="…"
icon="code"
it, and id="…" an anchor: writing-docs#accordion-faq opens the page with
writing-docs#accordion-faq
that accordion open. A link to a heading inside a closed accordion opens it
too.
<Accordion title="How do I link to an answer?" description="Give it an id" icon="code" id="accordion-faq">
Link to #accordion-faq; the accordion opens and scrolls into view.
#accordion-faq
In MkDocs syntax, ??? makes any callout a disclosure and ???+ starts it
???
???+
open.
<Tabs> with one <Tab title="…"> per choice: the same task in different
<Tabs>
<Tab title="…">
tools, languages or operating systems. Arrow keys move between tabs.
<Tab title="macOS and Linux">
Run export OPENAI_API_KEY=sk-... before aiui run.
export OPENAI_API_KEY=sk-...
aiui run
</Tab>
<Tab title="Windows">
Run setx OPENAI_API_KEY sk-..., then open a new terminal.
setx OPENAI_API_KEY sk-...
</Tabs>
Tabs sync by title: pick "Windows" once and every set of tabs on the page
with a "Windows" tab shows it, code groups included. The pick is remembered,
so the next page opens on it as well, and "On this page" lists only the
headings of the tabs shown. That covers a page-wide language or platform
switcher: use the same tab titles in each set. Options:
| Option | What it does |
|---|---|
| sync={false} on <Tabs> | This set keeps its own selection. |
sync={false}
| defaultTabIndex={1} on <Tabs> | The tab shown first (counted from 0) until the reader picks one. |
defaultTabIndex={1}
| borderBottom on <Tabs> | A rule under the tab content, to set it apart from the text below. |
borderBottom
| icon="terminal" on <Tab> | An icon before the title. |
<Tab>
| id="…" on <Tab> | An anchor: #windows-setup in the URL opens that tab. |
#windows-setup
<Tabs defaultTabIndex={1} borderBottom>
<Tab title="Windows" icon="terminal" id="windows-setup">
Tabs that each hold one code block draw as a code group (below). The MkDocs
form, consecutive === "Label" blocks with indented bodies, works too.
=== "Label"
Fence code with its language for highlighting and a copy button. 74
languages are highlighted, each grammar loaded only when a page uses it; the
rest show as plain text unless the site adds its own grammar
(code theme and languages). Comments are drawn in a
colour that keeps 4.5:1 contrast on the code background, light and dark.
Highlighted: apache, astro, awk, bash, bat, bicep, c, clojure, cmake, cpp,
csharp, css, csv, dart, diff, docker, dotenv, elixir, elm, fish, fsharp,
gleam, glsl, go, graphql, groovy, handlebars, haskell, hcl, html, http, ini,
java, javascript, jinja, json, jsonl, jsx, julia, kotlin, lua, make, markdown,
matlab, nginx, nix, objective-c, perl, php, powershell, prisma, proto,
python, r, regexp, ruby, rust, sass, scala, scss, solidity, sql, svelte,
swift, terraform, toml, tsx, typescript, vb, vue, wgsl, xml, yaml and zig,
with their common short names (sh, js, ts, py, yml, tf, ps1,
sh
js
ts
py
yml
tf
ps1
makefile, objc, protobuf, hs, ex and more).
makefile
objc
protobuf
hs
ex
import praisonaiui as aiui
async def on_message(message: str):
await aiui.say(f"You said: {message}")
After the language, name the file with title="…" (or just the name) and
title="…"
pick lines to highlight with {…}: single lines and ranges, separated by
{…}
commas.
Without title=, every word after the language up to the first option is
title=
the title: python Reply handler {3-4} shows "Reply handler".
python Reply handler {3-4}
highlight={3-4}, hl_lines="3 4" and highlight="3-4" work too, so fences
highlight={3-4}
hl_lines="3 4"
highlight="3-4"
written for MkDocs or in MDX syntax carry over.
Options go after the language, in any order, alone or together:
| lines | Line numbers in a gutter (the copy button copies the code only). |
lines
| wrap | Long lines wrap instead of scrolling sideways. |
wrap
| expandable | A block over 12 lines shows 12 and a "Show all N lines" button. |
expandable
| nocopy | No copy button. |
nocopy
| icon="terminal" | An icon before the title (terminal, code, rocket, …; other names show the code icon). |
code
| highlight={1-2,5} | Highlighted lines; {1-2,5} alone does the same. |
highlight={1-2,5}
{1-2,5}
| focus={2,4-5} | These lines stay sharp, the rest dim until the reader points at the block. |
focus={2,4-5}
A flag is never taken for a title, and twoslash is accepted and ignored.
twoslash
await aiui.say(f"You said: {message}, and this line is long enough to wrap on a phone")
End a line with a [!code …] comment in the language's own comment syntax
[!code …]
(//, #, --, <!-- -->) to mark it: ++ added, -- removed,
//
--
<!-- -->
++
highlight and focus. :N marks that line and the next N-1; a comment on a
highlight
focus
:N
line of its own marks the lines after it. The comments never show, and the
copy button copies the code without them.
port = 3000 # [!code --]
port = 8080 # [!code ++]
serve(port) # [!code highlight]
<CodeBlock> takes the same options as attributes (language, filename,
<CodeBlock>
language
filename
icon, lines, wrap, expandable, nocopy, highlight="[1,3]",
highlight="[1,3]"
focus="[2]") and renders exactly like the fence. The code goes between the
focus="[2]"
tags, as written or as a ` {…} ` template literal.
{
}
<CodeBlock language="bash" filename="install.sh" icon="terminal" lines highlight="[2]">
</CodeBlock>
Put fences between <CodeGroup> and </CodeGroup> (each on its own line) to
<CodeGroup>
</CodeGroup>
show them as tabs, one per fence, labelled with the file name or, without
one, the language. Use it for the same step in different tools or languages.
uv pip install aiui
poetry add aiui
<CodeGroup dropdown> picks the file from a menu in the header instead of
<CodeGroup dropdown>
tabs, for groups with many files or long names. Code groups sync with tabs
of the same title.
<Card> is a tile with a title, an optional icon and an optional href
<Card>
href
(a page like quickstart.md, or any URL); with a link the whole card is
quickstart.md
clickable. <CardGroup cols={2}> lays cards out in 1 to 4 columns (one on
<CardGroup cols={2}>
phones).
<Card title="Quick start" icon="rocket" href="../getting-started/quickstart.md">
A chat app in five minutes.
</Card>
<Card title="Layouts" icon="panels-top-left" href="layouts.md">
Five frames for the same app.
</CardGroup>
icon takes any icon. A list whose items start with bold text
also becomes a grid of plain cards.
Card options:
| horizontal | Icon beside the title, one compact row. |
horizontal
| img="images/x.png" | A header image across the top (relative paths resolve like Markdown images). |
img="images/x.png"
| cta="Read the guide" | A call-to-action line with an arrow at the bottom. |
cta="Read the guide"
| arrow / arrow={false} | A link arrow in the corner (on by default for links that leave the site). |
arrow
arrow={false}
| color="#0f766e" | The icon's colour (a hex, rgb(), hsl() or colour name). |
color="#0f766e"
rgb()
hsl()
<Card title="Quick start" icon="rocket" horizontal color="#0f766e" href="../getting-started/quickstart.md" />
<Card title="Themes" img="../images/theme-comparison.png" cta="Pick a theme" href="theming.md">
Light, dark and the presets side by side.
<Columns cols={2}> lays any content side by side, one <Column> per cell,
<Columns cols={2}>
<Column>
in 1 to 4 columns; on phones the columns stack.
Python: pip install aiui
</Column>
From source: pip install -e ".[dev]"
pip install -e ".[dev]"
</Columns>
Every icon (frontmatter, a navigation group, <Card>, <Callout>,
<Callout>
<Step>, <Tab>, <Accordion>, <Badge>, <Prompt>) and the <Icon> tag
<Badge>
<Prompt>
<Icon>
take the same values:
flag
git-branch, or an old name such as home);
git-branch
home
icon="🚀"
/icons/logo.svg
<Icon> puts one inside a sentence: size in pixels (default: the text's
size
size) and color (a hex, rgb(), a colour name or a theme token).
color
Ship it <Icon icon="flag" size={20} color="#0f766e" />, go <Icon icon="house" /> or <Icon icon="🚀" />.
The most used icons are drawn at once. Any other lucide icon loads on demand
from one of 32 small files (about 4 kB each), so a page downloads only the
icons it shows and no page gets heavier for the 1,900 icons on offer.
aiui validate warns (7009) about an icon name that is not lucide's, with the
nearest name.
gray
blue
green
yellow
orange
red
purple
xs
lg
shape="pill"
stroke
disabled
<Tooltip>
headline
cta
<Tree>
<FileTree>
/
name
<Tree.Folder name defaultOpen openable={false} highlight>
<Tree.File name highlight />
actions
copy
chatgpt
claude
cursor
<Tile>
<Color variant="compact|table">
<Color.Item name value>
{{ light, dark }}
<Color.Row title>
<colgroup><col width="30%"><col width="70%"></colgroup>
<table>
Document an endpoint's parameters and response with field rows. Each row
shows the name, its type, where it goes, required and deprecated, and
required
its default, then the description (any Markdown). For Python code, a
::: mypkg.module line writes these rows from the docstrings
::: mypkg.module
(Python API reference).
<ParamField> names the parameter by where it goes: path, query,
path
query
body or header. <ResponseField name> is a field of the response.
body
header
<ResponseField name>
Both take type (any text: string, string[], object, User | null),
type
string
string[]
object
User | null
required, deprecated, default, and pre / post: labels shown before
default
pre
post
or after the name (pre={["beta"]}, or pre="beta, internal").
pre={["beta"]}
pre="beta, internal"
placeholder is accepted for API playgrounds and not shown.
placeholder
Every row has its own link: #param-user_id, #response-next_cursor, and
#param-user_id
#response-next_cursor
for a nested field the path from its parent (#response-user-address). The
#response-user-address
name is that link, and opening it opens the <Expandable> around the field.
<Expandable>
id="…" sets the link yourself.
<ParamField path="user_id" type="string" required>
The user to fetch.
</ParamField>
<ParamField query="tags" type="string[]" default="all" pre={["beta"]}>
Only users with these tags.
<ResponseField name="user" type="object" required>
The user.
<Expandable title="user properties">
<ResponseField name="name" type="string">Display name.</ResponseField>
<ResponseField name="email" type="string" deprecated>Use emails.</ResponseField>
emails
</Expandable>
</ResponseField>
<Expandable title="…"> folds nested properties behind "Show …" (default
<Expandable title="…">
"Show properties"); defaultOpen starts it open. Nest them as deep as the
object goes.
<RequestExample> and <ResponseExample> hold code fences, labelled like a
<RequestExample>
<ResponseExample>
code group (several fences become tabs; dropdown picks one
dropdown
from a menu instead). They leave the article: on wide screens they stay in
view in a column on the right, in place of "On this page"; on phones they
follow the article. <Panel> puts anything else in that column.
<Panel>
curl https://api.example.com/v1/users/42
client.users.get("42")
{ "user": { "name": "Ada" } }
{ "error": "not_found" }
Put each on lines of its own, outside list items (a <Panel> inside a list
item stays where it is). This page has none, so it keeps its "On this page".
Write a block once and use it on many pages. Put it in docs/snippets/ (that
docs/snippets/
folder is never published as pages) and include it where it should appear:
docs/snippets/install.md, where {pkg} takes the value passed in:
docs/snippets/install.md
{pkg}
pip install {pkg}
Site-wide values go in one key of aiui.yaml, and {{name}} in any page or
{{name}}
snippet becomes the value, in text, code and front matter (title,
description):
the page, then in docs/snippets/, then the docs folder; /x.md starts at
/x.md
the docs folder. Indent the tag inside a list item and the snippet follows
the indent.
import Install from '/snippets/install.mdx'
then <Install pkg="aiui" />. From MkDocs: --8<-- "install.md" on
<Install pkg="aiui" />
--8<-- "install.md"
a line of its own.
\{{name}}
stays as written.
.md
llms-full.txt
and search all hold the expanded text. A missing snippet, a path outside the
project folder, or a snippet that includes itself fails the build (7008), and
aiui validate names each {{name}} that has no value (7007).
snippets
"!snippets" to content.docs.exclude.
"!snippets"
content.docs.exclude
A changelog page is a list of <Update> entries, newest first. Add
rss: true and readers can subscribe:
rss: true
label
anchor (#2026-11-18, or id="…"), a copy-link icon, a line in "On this
#2026-11-18
page" and its own result in site search. From 768px wide it sits in a left
column that stays in view while the entry scrolls.
tags
{["A", "B"]}
"A, B"
chips.
tags shows the entries with any of them and keeps the choice in the address
(?tags=API,Fix), so a filtered view is a link you can share.
?tags=API,Fix
entry: the label and description as its title, the entry's anchor as its
link, its tags as categories and its body as HTML; a label that is a date,
such as 2026-11-18 or November 18, 2026, becomes its date). The page's
2026-11-18
November 18, 2026
head gets <link rel="alternate" type="application/rss+xml">, so browsers
<link rel="alternate" type="application/rss+xml">
and feed readers find it, and the filter row shows an "RSS feed" link. Links
are absolute when the site URL is known (seo.siteUrl or a CNAME file),
seo.siteUrl
CNAME
base path included.
## label
Tags work the way MDX reads them: on lines of their own, on one line with
their text, inside a list item (indent the tag with the item's text), or
self-closing (<Card title="Docs" href="index.md" />). Attributes take quotes
<Card title="Docs" href="index.md" />
or braces (cols={3}) and may run over several lines. A body indented under
cols={3}
its tag is text, not code, as in MDX.
A tag the site does not know (say <Gadget>) keeps its
<Gadget>
text as plain Markdown, and aiui build and aiui validate name it:
Warning: docs/guide.md:12: <Gadget> is not a docs component; its content shows as plain Markdown.
Warning: docs/guide.md:12: <Gadget> is not a docs component; its content shows as plain Markdown
<Visibility for="humans"> / for="agents" shows its content only on the page /
<Visibility for="humans">
for="agents"
only to agents (AI-ready docs).
Write a React component once and use it on any page as a tag. Point the site
at one ES module beside aiui.yaml:
The module registers each component with registerBlock from @aiui/sdk, or
registerBlock
@aiui/sdk
exports it under the tag's name. It imports React and the SDK as bare names:
the build maps them to the page's own copies, so no bundler is needed for
plain JS, and hooks work.
or false, an array or an object ({{ calls: 10 }}, JSON or JS-style); a
{{ calls: 10 }}
bare attribute (<Counter compact />) is true. The component gets them as
<Counter compact />
props, and as node.props like any block.
node.props
children
A self-closing tag that shares its line with text sits inside the sentence.
after the page has painted; until then, and if the module fails or the
component throws, the page shows the tag's body. A built-in tag name
(<Note>, <Card>) keeps its built-in meaning.
registerBlock('Name'
export function Name). A minified bundle hides them: list them with
export function Name
site.components: {src: ./components/index.js, tags: [Counter, Price]}.
site.components: {src: ./components/index.js, tags: [Counter, Price]}
Declared tags are not reported as unknown; a missing module, or one with no
tag the build can find, is a 7021 warning.
(script-src 'self'); the build adds the import map's hash to the
script-src 'self'
Content-Security-Policy. Only same-site
modules load. In the .md copy for agents the tag's body stays and the tag goes.
var(--primary)
stylesheet with site.customCss.
site.customCss
An installed UI plugin whose blocks() include a type named
blocks()
like a component (HelloCard) provides that tag too, with no config: when a
HelloCard
page uses a tag nothing else knows, the build asks the plugins and publishes
the plugin's static folder with the site.
{/* … */} and <!-- … --> never show on the page, in search or in
{/* … */}
<!-- … -->
llms-full.txt; inside a code block they stay as written.
| Key | What it sets | Default |
| preset | colours (and for paper, the type) | zinc |
preset
zinc
| mode | light, dark or system | darkMode |
light
dark
system
darkMode
| radius | corner radius, none to xl | md |
radius
xl
md
A wide table scrolls inside its frame, never the page.
Paths are relative to the page. Write the alt text as a sentence about what
the image shows; it is also what search engines and assistants read. Click
any image (or focus it and press Enter) to see it at full size, with **Copy
image and Download** buttons; Escape or a click elsewhere closes it. An
image inside a link opens the link instead, and noZoom turns zoom off for
noZoom
one image:
width and height on <img> set its size and reserve the space before it
width
height
<img>
loads, so the page does not jump.
Show one image in light mode and another in dark mode. They follow the site's
theme toggle, not only the system setting. Any of these forms works, so the
same Markdown also reads well on GitHub:
Paste a YouTube, Vimeo or Loom URL (watch, share or embed form) in an
<iframe>, or a video file in <video>:
<iframe>
<video>
poster
reader presses it: nothing loads from the provider before that, so a page
of videos stays fast and sets no third-party cookies. YouTube plays from
youtube-nocookie.com, Vimeo with Do Not Track; the player runs in a
youtube-nocookie.com
sandboxed frame. width and height set the shape (16:9 by default).
<video autoPlay>
reduced motion get the controls instead. Without autoPlay it shows
autoPlay
controls.
Pages may use plain HTML for layout and text (<div>, <details>,
<div>
<details>
<kbd>, <sup>, tables, <img>, <picture>), plus the <iframe> and
<kbd>
<sup>
<picture>
<video> above, styled with utility classes. Anything that could run code or send the reader's data
elsewhere is not rendered, so a page can never become a way to attack its
readers:
| You write | The reader sees | Instead |
|-----------|-----------------|---------|
| <iframe> from a site other than YouTube, Vimeo or Loom | a link to it | a link, or a screenshot with a link |
| <script> | nothing | site.customJs |
<script>
site.customJs
| <style>, <link rel="stylesheet"> | nothing | site.customCss |
<style>
<link rel="stylesheet">
| <form>, <audio>, <object>, <embed> | nothing | a link |
<form>
<audio>
<object>
<embed>
aiui validate and aiui build name each one with its file and line
(finding 7019). HTML inside code fences and inline code is shown as code and
never flagged.
<Frame> sets an image on a mat, with an optional caption under it and a hint above
<Frame>
caption
hint
it (both Markdown, links included):
<Frame caption="A tool call, then an approval the agent waits on.">
!A tool call row (execute_command, Done in 0.3 s) above the answer, then an approval card for pip install numpy with Approve and Deny
</Frame>
Add className (or class) to a component tag or to raw HTML to adjust one
className
class
block: its spacing, width, text, colour or layout. The classes use the site's
theme tokens, so they follow light and dark mode and any theme preset:
Only these classes work ({a,b} means either). Any other class is dropped,
{a,b}
and aiui validate and aiui build name it with its file and line, with the
nearest allowed class (finding 7022). Nothing on a page can move the site's
header, sidebar or search, or cover them, so there is no fixed, absolute,
fixed
absolute
z-* or arbitrary [...] value.
z-*
[...]
| Group | Classes |
|-------|---------|
| Display | block, inline-block, inline, flex, inline-flex, grid, hidden |
block
inline-block
inline
flex
inline-flex
grid
| Flex and grid | flex-row, flex-col, flex-wrap, flex-1, flex-none, shrink-0, grid-cols-{1,2,3,4}, col-span-{2,3,full}, items-{start,center,end,baseline}, justify-{start,center,end,between}, self-{start,center,end}, gap{,-x,-y}-{0,1,2,3,4,6,8} |
flex-row
flex-col
flex-wrap
flex-1
flex-none
shrink-0
grid-cols-{1,2,3,4}
col-span-{2,3,full}
items-{start,center,end,baseline}
justify-{start,center,end,between}
self-{start,center,end}
gap{,-x,-y}-{0,1,2,3,4,6,8}
| Spacing | m, mx, my, mt, mb, p, px, py, pt, pb with -{0,1,2,3,4,6,8,12}; mx-auto |
m
mx
my
mt
mb
p
px
pt
pb
-{0,1,2,3,4,6,8,12}
mx-auto
| Size | w-{full,auto,fit,1/2,1/3,2/3,1/4,3/4}, max-w-{xs,sm,md,lg,xl,2xl,full,prose}, h-auto, min-w-0, aspect-{video,square}, object-{cover,contain} |
w-{full,auto,fit,1/2,1/3,2/3,1/4,3/4}
max-w-{xs,sm,md,lg,xl,2xl,full,prose}
h-auto
min-w-0
aspect-{video,square}
object-{cover,contain}
| Text | text-{xs,sm,base,lg,xl,2xl,3xl}, font-{normal,medium,semibold,bold,mono}, text-{left,center,right}, italic, underline, no-underline, uppercase, truncate, whitespace-nowrap, break-words, leading-{tight,normal,relaxed}, tracking-{tight,wide} |
text-{xs,sm,base,lg,xl,2xl,3xl}
font-{normal,medium,semibold,bold,mono}
text-{left,center,right}
italic
underline
no-underline
uppercase
truncate
whitespace-nowrap
break-words
leading-{tight,normal,relaxed}
tracking-{tight,wide}
| Colour (theme tokens) | text-{foreground,muted-foreground,primary,primary-foreground,destructive,success,warning,info}, bg-{background,card,muted,accent,primary,secondary}, border-{border,primary} |
text-{foreground,muted-foreground,primary,primary-foreground,destructive,success,warning,info}
bg-{background,card,muted,accent,primary,secondary}
border-{border,primary}
| Borders | border, border-0, border-2, border-t, border-b, border-dashed, rounded{,-none,-sm,-md,-lg,-xl,-full} |
border
border-0
border-2
border-t
border-b
border-dashed
rounded{,-none,-sm,-md,-lg,-xl,-full}
| Other | overflow-hidden, overflow-x-auto, opacity-{50,75} |
overflow-hidden
overflow-x-auto
opacity-{50,75}
| Screen size | sm:, md: and lg: before a display class, flex-row, flex-col, grid-cols-{1,2,3,4}, text-{left,center,right} or w-{full,1/2,1/3,2/3} (from 640, 768 and 1024 px wide) |
sm:
md:
lg:
w-{full,1/2,1/3,2/3}
| Dark mode | dark: before a display class: dark:hidden, dark:block, dark:inline-block, dark:inline, dark:flex, dark:grid |
dark:
dark:hidden
dark:block
dark:inline-block
dark:inline
dark:flex
dark:grid
<Note className="mt-8">
really moves the note.
style="…"
classes do not cover, write CSS in site.customCss.
site.components
decide what to do with it. <Tab> and <Visibility> take no classes.
<Visibility>
A mermaid fence draws a diagram (loaded only on pages that have one). All 24 official Mermaid diagram types (flowchart/graph in LR/RL/TB/TD/BT with recursive nested & transparent subgraphs, per-subgraph direction, paired bowed edges, nested outer TB skip-lanes, v11 @{} shapes, HTML/#-entities, Markdown strings, fa: prefixes, and YAML frontmatter; sequenceDiagram with Note and alt/opt/loop/par/critical/break/rect/box frames; classDiagram, erDiagram, stateDiagram-v2, gantt, pie, xychart-beta, quadrantChart, radar-beta, treemap-beta, sankey-beta, venn-beta, mindmap, timeline, gitGraph, journey, kanban, packet-beta, block-beta, architecture-beta, C4*, requirementDiagram, and zenuml) automatically upgrade in docs to the lightweight interactive animated viewer powered by aidiagram-js (with Play/Pause walkthrough, travelling flow pulses, click-to-inspect, drag-pan, SVG/PNG export, and a Classic toggle). Add %% diagram: off (or %% visual: off) on the first line to force classic Mermaid.js, and unsupported/truncated syntax (e.g. o--o/x--x or unclosed fences) fails closed without altering your source. $$ … $$ typesets math.
mermaid
flowchart
graph
LR
RL
TB
TD
BT
subgraph
direction
@{}
fa:
sequenceDiagram
Note
alt
opt
loop
par
critical
break
rect
box
classDiagram
erDiagram
stateDiagram-v2
gantt
pie
xychart-beta
quadrantChart
radar-beta
treemap-beta
sankey-beta
venn-beta
mindmap
timeline
gitGraph
journey
kanban
packet-beta
block-beta
architecture-beta
C4*
requirementDiagram
zenuml
aidiagram-js
%% diagram: off
%% visual: off
o--o
x--x
$$ … $$
flowchart LR
YAML --> build["aiui build"] --> site[Static site]
For editorial, animated and interactive architecture diagrams in both docs and chat, use a diagram fence (or legacy aliases visual / praisonai-visual) with the aidiagram YAML/JSON spec. Supported built-in layouts (24): flow, fan, loop, stack, timeline, map, graph, sequence, pie, xychart, gantt, quadrant, radar, treemap, sankey, venn, class, er, mindmap, gitgraph, journey, kanban, packet, and block. Readers can click any node to inspect its description, code snippet or link, step through with Play or ←/→, zoom, expand fullscreen, or download a standalone animated SVG.
diagram
visual
praisonai-visual
aidiagram
flow
fan
stack
map
sequence
xychart
quadrant
radar
treemap
sankey
venn
er
gitgraph
packet
←
→
type: flow
label: "YAML config compiles into manifests and renders as an interactive static site."
eyebrow: Docs pipeline
numbered: true
steps:
note: "Routes, theme & navigation"
description: "Declares site navigation, theme preset, and content sources."
note: "Compiles manifests & assets"
highlight: true
code: "aiui build --output aiui-output/"
note: "Fast SPA with search & visuals"
Readers press <kbd>⌘</kbd> <kbd>K</kbd> (<kbd>Ctrl</kbd> <kbd>K</kbd>) or the
search field. Search covers page titles, every ## and ### heading and all
the text under it, and a result opens the page at its section with the words
marked. It forgives typing: plurals and verb forms match ("themes",
"theming"), a word matches as you type it ("inst"), one typo in a longer word
still matches, and question words drop out ("how do I deploy"). Titles rank
first, then headings, then text, each BM25 style.
While the dialog is open the address bar carries the query, so a link such as
/docs?q=api+keys opens search filled in. On a site with header tabs
/docs?q=api+keys
(Navigation), chips filter results by tab: search starts in
the reader's tab, and one row offers the other tabs' results when it has none.
A navigation group's boost: applies to its pages (a page's own wins).
boost:
Site settings (search.provider is ignored and aiui validate says so):
search.provider
aiui build writes the index (search-index.json, up to 6,000 characters
search-index.json
per section) and the same index in parts under search-index/, so the dialog
search-index/
downloads only what a query needs:
| Part | Holds | Fetched |
| search-index/meta.json | each page's path, keywords, boost and section headings with their word counts, and the sorted list of every word | the first time a reader opens search |
search-index/meta.json
| search-index/<key>/w<n>.json | for a run of those words, the sections each appears in and how often | when a query has a word in that run (by stem, prefix or one typo) |
search-index/<key>/w<n>.json
| search-index/<key>/p<i>.json | page i's section text | when the page is in the results, for its snippets |
search-index/<key>/p<i>.json
i
Ranking is the same as over the whole file: BM25, stems, prefixes, typos,
keywords, boost and the tab chips. On this repository's 99 searchable pages
the first open downloads 35 KB gzipped instead of 181 KB, and a first query
about 13 KB more. <key> is a hash of the index, so a page cached from an
<key>
older deploy never mixes parts; a missing part, or a site built before the
parts existed, makes the dialog read search-index.json whole, which every
other reader (the MCP server, Ask AI, older
pages) still uses. A site with sign-in gets no parts: its
search-index.json is cut per reader.
Link to another page by its file: Theming. The build turns it
Theming
into the page's URL, so links work on GitHub and on the site.
A folder's README.md or index.md is served at the folder's URL
README.md
index.md
(protocols/adp/README.md at /docs/protocols/adp), and a number prefix is
protocols/adp/README.md
/docs/protocols/adp
dropped (adr/0003-selectable-layouts.md at /docs/adr/selectable-layouts).
adr/0003-selectable-layouts.md
/docs/adr/selectable-layouts
List such a page in the nav by its file path (protocols/adp/README); the
protocols/adp/README
header still opens the tab that lists it.
aiui docs check-links finds every link that leads nowhere, before readers do:
aiui docs check-links
It checks Markdown links and images, reference links, href and src on
src
components and HTML (<Card href>, <a>, <img>), the docs home hero and
<Card href>
<a>
features links, the nav page entries and the navbar and footer links in the
YAML. A #section link is checked against the ids the site gives its headings
#section
(## The aiui CLI is #the-aiui-cli). Links in code are skipped. Paths outside
## The aiui CLI
#the-aiui-cli
the docs (app routes such as /chat) are not judged.
/chat
--external also requests every http(s) URL, and --json prints the result
--external
http(s)
--json
for scripts. The exit code is 1 when a link is broken, so a CI step needs one
1
line. aiui validate --strict and aiui build --strict fail on broken links
aiui validate --strict
aiui build --strict
too; without --strict they print them as warnings.
Above every page's title, Copy page copies the page's Markdown, ready to
paste into an assistant. Ctrl+C (⌘C on a Mac) does the same when nothing
Ctrl+C
⌘C
is selected and the cursor is not in a text field. Its menu also has:
| Action | Id | What it does |
| Copy page | copy | The page's agent-ready Markdown on the clipboard |
| View as Markdown | view | Opens /docs/<page>.md, the page as plain Markdown for assistants |
view
| Download as PDF | pdf | The browser's Print dialog; pick Save as PDF |
pdf
| Listen to page | listen | The browser reads the article aloud, with pause and stop; hidden where the browser has no speech |
listen
| Open in ChatGPT | chatgpt | A new ChatGPT chat that reads the page and takes questions |
| Open in Claude | claude | The same, in Claude |
| Copy MCP server URL, Connect to Cursor / VS Code | mcp | On a site aiui serve runs (MCP server) |
mcp
Nothing to configure: they use the Markdown aiui build already publishes.
Try it on this page.
To pick and order the actions, list them. Besides the ids above there are
perplexity, grok, google (Google AI Mode), copilot, mistral (Le Chat)
perplexity
grok
google
copilot
mistral
and cursor, and links of your own:
In href, {url} is the page's address, {md} its Markdown, {title} its
{url}
{md}
{title}
title and {prompt} the "read this page" prompt the assistants get, each
{prompt}
URL-encoded. pageActions: false turns the menu off. One page can have its own
pageActions: false
list, or none, in its front matter:
A printed page (Download as PDF, or the browser's own Print, Ctrl+P / ⌘P)
Ctrl+P
⌘P
is the article alone, on light paper even when the reader uses dark mode:
and feedback are left out. Breadcrumbs and "Last updated" stay.
lists and file trees open, every tab of <Tabs> and <CodeGroup> prints
under its own title, and expandable code blocks print every line.
steps, table rows and images are not split across pages.
link (https://example.com/docs).
link (https://example.com/docs)
Site chrome added by custom JS (site.customJs) or a plugin can opt out of
print with data-print="hide". The PDF comes from the reader's browser: no
data-print="hide"
build step, no server-side renderer.
Under each page: "Was this page helpful?" (on by default, see
Page feedback) and two optional parts, turned on in aiui.yaml:
pattern
:path
file under the docs folder (getting-started/quickstart.md).
getting-started/quickstart.md
aiui build reads it from git. In a shallow clone, pages changed inside the
cloned history keep their date; older ones get none rather than the clone's
date. In GitHub Actions, check out with fetch-depth: 0 to date every page.
fetch-depth: 0
A page's lastUpdatedDate: 2026-05-01 sets the date by hand, and
lastUpdatedDate: 2026-05-01
timestamp: false (or true) turns it off (or on) for that page alone.
timestamp: false
issues
"No" also offers a new issue there with the page's title and address filled in.
The footer of this page shows all three.
Under each page, "Related pages" lists the three pages closest to it. Nothing to
configure: aiui build compares the words of every page (title, keywords,
description and headings count most, then the text) and favours pages in the
same sidebar group. Hidden, noindex and searchable: false pages and the home
searchable: false
page are never suggested. The list is part of docs-nav.json, so it works on any
docs-nav.json
static host and offline, and each page's agent-ready .md
ends with it too.
Pick the list for a page in its front matter, or turn it off:
related: false shows none on that page. Site-wide, content.docs.related: 5
related: false
content.docs.related: 5
shows five (at most 10) and content.docs.related: false only the lists pages
content.docs.related: false
set themselves. aiui validate reports a target that is no page (7013). The
block is left out when the page prints.
Nothing to configure: under aiui serve and aiui dev every docs page asks
aiui dev
"Was this page helpful?". A vote is stored at once; the reader can then add a
comment (up to 1,000 characters), which joins that vote. Read them with:
Votes are lines of docs-feedback/feedback.jsonl in the data directory
docs-feedback/feedback.jsonl
($AIUI_DATA_DIR, default ~/.praisonaiui). POST /api/docs/feedback takes
$AIUI_DATA_DIR
~/.praisonaiui
POST /api/docs/feedback
same-origin requests only (plus --cors-origins, AIUI_ALLOWED_ORIGINS),
--cors-origins
AIUI_ALLOWED_ORIGINS
checks the Host header, takes 4 KiB and 20 posts a minute per client, and
stops at 20 MB. Nothing is readable over HTTP; the export is the CLI.
Agents report through the docs MCP server's submit_feedback tool into the
submit_feedback
same store and limits (MCP server).
A code flag is a -1 vote with kind: "code" and block, the block's index
-1
kind: "code"
on the page, plus an optional comment. aiui serve and aiui dev say in the
ui-config.json they serve where they keep votes (docsFeedback.url); a
ui-config.json
docsFeedback.url
static host (GitHub Pages, any CDN) serves the built file, which has no such
entry, so with no endpoint the page sends no request at all and the
endpoint
question is shown only if issues is set.
endpoint receives the vote as JSON, sent as text/plain when it is on
text/plain
another origin so the browser makes no preflight request: `{"id", "path",
"value", "kind", "block", "comment"}`. A comment arrives as a second post with
the same id. Every vote, wherever it goes, also fires a browser event your
id
own script can send to analytics:
Off by default. Every docs page records how each of its requests went
(aiui:docs-load records: retries, time-outs, failures, timings). Turn on
aiui:docs-load
telemetry and the page also sends the ones that went wrong, plus a sample of
the good timings, home, so a reader's stalled page shows up without anyone
watching that tab:
Read what aiui serve stored with:
What is sent: the requested file, its kind (doc or manifest), the
doc
manifest
attempt, the time it took, the outcome and reason, the HTTP status and the
page path. Query strings and fragments are dropped. No user or session id and
no user agent is sent, and the server stores no IP address or header. The
page collects records while it is open and sends them in batches of up to 50
with navigator.sendBeacon when it is hidden or left, so nothing is sent
navigator.sendBeacon
while it loads. A post is JSON sent as text/plain (no preflight on another
origin): `{"v": 1, "records": [{"url", "kind", "attempt", "of", "ms",
"outcome", "reason", "status", "page", "sampled"}]}`.
With telemetry: true only aiui serve and aiui dev receive records: they
telemetry: true
name /api/docs/telemetry in the ui-config.json they serve
/api/docs/telemetry
(docsTelemetry.url). A static host serves the built file, which has no such
docsTelemetry.url
entry, so the page sends nothing and asks nothing. The endpoint takes
same-origin requests (plus --cors-origins, AIUI_ALLOWED_ORIGINS), checks
the Host header, takes 16 KiB and 30 posts a minute per client, and stops at
20 MB; on a site with sign-in it needs a signed-in reader.
Records are lines of docs-telemetry/telemetry.jsonl in the data directory
docs-telemetry/telemetry.jsonl
($AIUI_DATA_DIR, default ~/.praisonaiui). The pre-QA dashboard
(tools/preqa) shows them when that file exists.
tools/preqa
| File | What it holds |
| /llms.txt | every page with its description, by nav group (llmstxt.org) |
/llms.txt
| /llms-full.txt | every page's agent-ready Markdown in one file |
/llms-full.txt
| /docs/<page>.md | one page's agent-ready Markdown (AI-ready docs) |
| /docs/<page>.source.md | the page source the site renders |
/docs/<page>.source.md
| /search-index.json | headings and text per page, for the site's own search |
/search-index.json
| /search-index/ | the same index in parts, fetched as a query needs them (Search) |
/search-index/
| /sitemap.xml, /robots.txt | for search engines |
/sitemap.xml
/robots.txt
Each page's HTML also carries that page's source (a JSON script,
id="aiui-initial-doc"), so the first visit renders without a second request
id="aiui-initial-doc"
for it. Pages over 200 KB of Markdown are fetched as before. It also carries
docs-nav.json and route-manifest.json (id="aiui-boot-data", each up to
route-manifest.json
id="aiui-boot-data"
100 KB; not the navigation of a site with sign-in) and preloads
ui-config.json; see
Deploy to GitHub Pages → How pages load.