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.
- Domaine
- Blocs de page et gabarits
- Niveau de support
- Taille
- 2.8 kB gzip, budget 7.2 kB
- Qui l'utilise
- Aucun produit en production ne l'importe encore Compté dans l'inventaire daté du 2026-11-23.
import { docsSource } from "@krizaka/ui/docs-source";Web uniquement — React, depuis @krizaka/ui/docs-source. Bêta : son API peut encore changer à une version mineure.
- Mobile · n/a. Documentation is read on the sites, not inside an app.
- Bureau · n/a. A public site's content, not a window of the Mac app.
Pourquoi il est là. A folder of Markdown rendered as docs pages, nav, headings and pager: the products' documentation sites adopt it (krizaka-internal#3886).
Quand l’utiliser
- 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.
Quand ne pas l’utiliser
- For the documentation of a component, generated from its code.
- For long editorial pieces with a layout of their own.À la place : Longform page
Installation
Installer
npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcssStyles
@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";Importer
import { docsSource } from "@krizaka/ui/docs-source";Exemples
From files to an article
Three Markdown files in English and French, read into a DocsArticlePage.
Props
Ce module n'a pas de props de composant : voir l'import et l'aperçu ci-dessus.
Accessibilité
- 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.
Bonnes pratiques
- 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).
Composants liés
Générée depuis le code de @krizaka/ui 5.3.4 : son meta.ts, ses exemples et ses types.Modifier cette documentation sur GitHub