Docs source
A folder of <page>.<locale>.md files becomes the page list, the nav groups, the headings and the previous / next of a documentation, in one pure function.
- Domain
- Page blocks & templates
- Support level
- Size
- 2.8 kB gzip, budget 7.2 kB
- Who uses it
- No live product imports it yet Counted in the dated inventory of 2026-11-23.
import { docsSource } from "@krizaka/ui/docs-source";Web only — React, from @krizaka/ui/docs-source. Beta: its API may still change in a minor version.
- Mobile · n/a. Documentation is read on the sites, not inside an app.
- Desktop · n/a. A public site's content, not a window of the Mac app.
Why it is here. A folder of Markdown rendered as docs pages, nav, headings and pager: the products' documentation sites adopt it (krizaka-internal#3886).
When to use
- A product's docs written as Markdown files, French and English, rendered with
DocsArticlePage. - A coming-soon site that carries its documentation without a docs engine.
When not to use
- For the documentation of a component, generated from its code.
- For long editorial pieces with a layout of their own.Use instead: Longform page
Installation
Install
npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcssStyles
@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";Import
import { docsSource } from "@krizaka/ui/docs-source";Examples
From files to an article
Three Markdown files in English and French, read into a DocsArticlePage.
Props
This module has no component props: see the import and the preview above.
Accessibility
- It produces data, not markup: the
nav, the breadcrumb and the contents areDocsNav,DocsArticlePageandToc. - The page's language is the reader's; a fallback page is flagged so the app can set
langon it.
Best practices
- One file per page and language:
getting-started.fr.md,getting-started.en.md;guides/install.en.mdmakes the slugguides/install. - Front matter:
title,description,group,order(a number),updated(YYYY-MM-DD); onlytitleis needed (or a first#heading). - Render the body with
MarkdownandheadingIds: its ids are the ones the contents list. - A page with no file in the reader's language falls back to the default language and says so (
fallback).
Related components
Generated from the code of @krizaka/ui 5.3.4: its meta.ts, its examples and its types.Edit this documentation on GitHub