Move or rename a page without breaking the links people already have, and
choose what readers see on a URL with no page.
List moved pages under redirects: at the top level of aiui.yaml:
redirects:
aiui.yaml
| Key | Meaning |
|-----|---------|
| source | A site path starting with /. :name matches one path segment; a final :name* matches the rest of the path, including nothing (/docs/v1/:slug* matches /docs/v1 and /docs/v1/a/b). |
source
/
:name
:name*
/docs/v1/:slug*
/docs/v1
/docs/v1/a/b
| destination | A site path or a full URL. It can reuse the names from source. |
destination
| permanent | true (default) answers with 301, false with 302. |
permanent
true
false
The first matching rule wins. Leave out the --base-path prefix: rules use
--base-path
site paths and the build adds the base path.
aiui build publishes every rule whose source is not a published page:
aiui build
| Host | Exact source (/docs/old) | Wildcard source (/docs/v1/:slug*) |
/docs/old
|------|----------------------------|-------------------------------------|
| aiui serve | 301 / 302 | 301 / 302 (a file at the path wins) |
aiui serve
| Netlify, Cloudflare Pages | 301 / 302 from the _redirects file | 301 / 302 from _redirects |
_redirects
| GitHub Pages, any static host | A stub page at the old URL (meta refresh, a canonical link, a script redirect) | The docs app follows the rule from the page-not-found view |
The query string and the #section carry over unless the destination sets
#section
its own. A stub never replaces a real file; it has noindex and a canonical
noindex
link to the new URL. The link check
treats every source as a valid link.
aiui validate warns when an exact rule loops or ends at a docs path with no
aiui validate
page (7010), or when a page is still published at its source (7011).
A URL with no page shows "Page not found", a link home, the search, and up
to three pages from the sidebar whose names are close to the URL (a typo
such as /docs/instalation offers Installation), unless a redirects: rule
/docs/instalation
matches first. Set the heading and text under errors::
errors:
| Key | Default | Meaning |
|-----|---------|---------|
| title | Page not found | The heading and the browser tab title |
title
Page not found
| description | A line naming the missing path | Markdown under the heading |
description
| redirect | false | true sends readers to the home page instead of showing the page |
redirect