Warning
This is an internal project, and is not intended for public use. No support or stability guarantees are provided.
All useful content should be represented in the HTML without JavaScript. This ensures crawlers, screen readers, and users on slow connections can access documentation content immediately.
This convention works together with Markdown First: markdown provides a readable source format, and semantic HTML ensures the rendered output is equally accessible to both humans and machines.
The CodeHighlighter component
first renders plain text inside standard <pre><code> elements,
then after hydration and entering the viewport,
replaces it with rich syntax-highlighted markup.
The fallback content is what search engines and AI bots see in the
initial HTML, making it crucial for SEO and content discovery.
fallbackUsesExtraFiles
includes all extra files from the selected variant, and
fallbackUsesAllVariants
includes all implementation approaches (CSS Modules, Tailwind, etc.)
in the initial HTML for comprehensive automated indexing.
HAST enhancers add visual annotations
(wrapper elements, CSS classes, data-* attributes) without changing
the plain text output, so the swap from plain text to highlighted code
is seamless.
All exported types should be accessible in the initial HTML.
The useTypes hook and its companion
useType hook register type metadata
into a shared context, but the underlying markup uses semantic elements:
<dl>
for definition-style type listings.<table>
for tabular prop/type displays, with inline <code> elements for
type signatures highlighted by
transformHtmlCodeInline.<a> tags linking related types so crawlers can understand how pages
relate to one another programmatically. When a type hasn't been registered
in a TypesDataProvider, the
TypeRef component falls back to a plain link rather than an interactive popover.If your site functions at a basic level without JavaScript, it's a good indication that crawlers have access to all the same information. Try disabling JavaScript in the browser and verifying that:
<pre><code> elements.<table> and <dl> markup.<a> tags.