blob: fd34eba42711e8187671286c7eb3e28cc4b4a96d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
import type { Locale } from "../locales";
/** One piece of a documentation page, in reading order. */
export type DocBlock =
| { kind: "heading"; text: string }
| { kind: "subheading"; text: string }
| { kind: "text"; text: string }
| { kind: "code"; code: string }
| { kind: "terms"; items: readonly { term: string; detail: string }[] }
| { kind: "note"; title: string; text: string };
/** A documentation page in one language. */
export type DocPageText = {
/** The name of the page in the sidebar. */
nav: string;
/** The document title and its description for search engines. */
title: string;
description: string;
section: string;
heading: string;
lead: string;
blocks: readonly DocBlock[];
};
/** A documentation page in every published language. */
export type DocTopic = Record<Locale, DocPageText>;
/** A topic and the path it is served at. */
export type DocRoute = { path: string; topic: DocTopic };
|