Static documentation pages use a UIContent block with embedded content, ideal for standalone documentation like /blog or /changelog. They appear in the sidebar without needing a post document and can be edited in the Page Builder.
Static documentation pages utilize a UIContent block that does not require a post route parameter. Instead, content is embedded directly into the block via fields such as title, description, and content.
These pages are ideal for standalone documentation like /blog, /changelog, or /overview, appearing in the sidebar without needing a post document.
Functionality Overview
Normal docs pages pull sidebar content from category documents linked to post references. For static pages, a category contains a reference as follows:
{
_type: 'reference',
_ref: '/blog',
_schema: 'route'
}
This setup preserves sidebar organization, allowing static and dynamic content coexistence.
Page Builder Editing
In the Page Builder, you can edit a static UIContent block and manage its visibility in the sidebar:
Show in sidebarChanges to the sidebar category update references without modifying the category document's status, ensuring streamlined management.
Rendering Behavior
The UISidebar differentiates between normal documents and static route references when rendering, fetching content based on the linking for each.
Example
For a static /blog page:
{
title: 'Static Blog Post',
description: 'This is a static page.',
content: '...'
}
Enabling Show in sidebar for the Blog category results in:
BLOG
Static Blog Post
Clicking it links to:
/blog
Constraints
To effectively use static pages in the sidebar:
UIContent blockuicontent blockcategories document must exist