Dynamic Content
Not all pages need a source markdown file. zpress supports inline content, async generators, and hidden pages for dynamic use cases.
Inline content
Set content to a string to create a page without a source file:
The string is treated as markdown and processed the same as file-sourced pages.
Async generators
Set content to an async function to generate page content at build time:
The function runs during sync and its return value becomes the page content. Use this for:
- Changelogs pulled from an API
- Status pages with live data at build time
- Generated documentation from schemas or specs
Frontmatter on virtual pages
Virtual pages (those using content) support injected frontmatter the same way as file-sourced pages:
Hidden pages
Set hidden: true to build and route a page without showing it in the sidebar:
Hidden pages are still accessible by URL and can be linked to from other pages. Use this for:
- Pages linked from other content but not worth a sidebar entry
- Redirect targets
- Utility pages