linopress-cli/config
defineConfig and the types of linopress.config.ts, plus validateConfig and loadConfig.
Interfaces
LinearEditionConfig
An edition synced to Linear Documents. Without team or project it can be planned, not pushed.
Extends
EditionSource
Properties
| Property | Type | Description |
|---|---|---|
dir? | string | Or: a folder of already-generated Markdown. |
layout? | LayoutMode | nested (default) puts docs under the index doc; flat keeps them top-level. |
project? | string | - |
target | "linear" | - |
team? | string | - |
title? | string | Title of the index page (and the title prefix in flat layout). Defaults to "API Reference". |
typedoc? | string | A TypeDoc options file; Linopress runs TypeDoc with typedoc-plugin-markdown. |
typedocOptions? | Readonly<Record<string, unknown>> | TypeDoc options applied over the typedoc file, so one file can serve several editions: { excludeInternal: true } for the public one. Ignored with dir. |
LinopressConfig
Properties
| Property | Type | Description |
|---|---|---|
editions | Readonly<Record<string, EditionConfig>> | - |
manifest? | string | Linear sync state. Defaults to .linopress-manifest.json. |
repository? | string | Repository that doc footers link to, at the synced commit: a web URL (https://github.com/acme/billing, github.com/acme/billing), an SSH remote, or GitHub shorthand (acme/billing). Defaults to the git origin remote. Without either, or when the commit isn't on a remote branch, footers name the files without links. |
LoadedConfig
Properties
| Property | Type | Description |
|---|---|---|
config | LinopressConfig | - |
dir | string | Directory of the config file; relative paths in the config resolve against it. |
MarkdownEditionConfig
An edition written as Markdown files, for VitePress or any other static site generator.
Extends
EditionSource
Properties
Type Aliases
EditionConfig
type EditionConfig =
| LinearEditionConfig
| MarkdownEditionConfig;One edition of the docs, e.g. internal (with @internal, to Linear) or public (to files).
Variables
CONFIG_FILES
const CONFIG_FILES: readonly string[];Functions
defineConfig()
function defineConfig(config): LinopressConfig;Identity helper that gives linopress.config.ts type checking.
Parameters
| Parameter | Type |
|---|---|
config | LinopressConfig |
Returns
loadConfig()
function loadConfig(cwd, file?): Promise<LoadedConfig | null>;Loads linopress.config.* from cwd (or file). TypeScript configs are imported with Node's built-in type stripping (Node ≥ 22.18), so they must use erasable syntax only. Returns null when there is no config file.
Parameters
| Parameter | Type |
|---|---|
cwd | string |
file? | string |
Returns
Promise<LoadedConfig | null>
validateConfig()
function validateConfig(raw, dir?): LinopressConfig;Checks a config's shape and returns it typed. Throws one error listing every problem, with the path to each (editions.public.out), so typos and leftovers don't silently do nothing. dir is the config file's folder, which relative out folders resolve against.
Parameters
| Parameter | Type |
|---|---|
raw | unknown |
dir? | string |