Configuration
Editions
An edition is one view of your API for one audience, published to one target. Editions can share a typedoc.json; typedocOptions is applied over it, so they differ only where they say so.
{ excludeInternal: true }drops@internalsymbols, which is what most public editions want.- For an audience of your own, tag symbols with a category (
@category Team only) and leave it out with{ excludeCategories: ["Team only"] }. TypeDoc'sexcludeTagsonly removes a tag's text from comments; it doesn't hide the symbol. { treatWarningsAsErrors: true }makes TypeDoc warnings, such as a{@link}to something that doesn't exist, failplanandpush. Set it so CI catches broken doc comments.
The config is checked when it's loaded: an unknown option, a team on a Markdown edition or a missing out is an error rather than silently ignored.
| Option | Editions | Meaning |
|---|---|---|
typedoc | all | TypeDoc options file to run |
typedocOptions | all | TypeDoc options applied over that file |
dir | all | Or: a folder of Markdown that's already generated |
title | all | Title of the index page (default "API Reference") |
target | all | linear or markdown |
team/project | linear | Linear team or project id to hold the docs |
layout | linear | nested (default, under the index doc) or flat (title prefixes) |
out | markdown | Folder to write the files to |
Two top-level options sit next to editions: manifest, the sync state file (default .linopress-manifest.json), and repository, the repository that source links point to (defaults to the git origin remote).
Targets
Linear
Linear Documents in a team or a project.
- Links between pages point at the Linear documents.
- Images and linked files, such as
, are uploaded once, and again only when they change. - Every document gets a footer linking its source files at the pushed commit. Links appear when the commit is on a remote branch, so push from CI or from a pushed commit.
- TypeDoc's
<a id>anchors are removed and in-page#links are unlinked, since Linear would show the anchors as text.
Markdown
Files in out, for VitePress or another static site generator.
- Pages keep TypeDoc's anchors, get their title as an H1 and start with a "generated, edit the source" comment. Images are copied to
<out>/_media/. pushrecords the files it wrote in<out>/.linopress.jsonand only ever changes or deletes those, sooutcan also hold your site's config and hand-written pages. If a page would overwrite a file it didn't write,pushstops and names it;--forcereplaces it.
Commands
linopress plan [edition | --all] [options] Show what publishing would change (never writes)
linopress push [edition | --all] [options] Publish to the edition's target (--dry-run to only plan)
linopress print [edition | --all] [options] Print the Markdown each page would get| Option | Meaning |
|---|---|
--typedoc <file> | TypeDoc options file to run |
--dir <dir> | Folder of already-generated Markdown |
--team <id>, --project <id> | Linear team or project to hold the docs |
--out <dir> | Write Markdown files to this folder instead of Linear |
--force | push: replace files in the output folder that Linopress didn't write |
--flat | Top-level docs with title prefixes instead of nesting under the index |
--title <title> | Index page title, or the prefix with --flat (default "API Reference") |
--manifest <file> | Sync state file (default .linopress-manifest.json) |
--config <file> | Config file (default linopress.config.{ts,mts,js,mjs}) |
--all | Run for every edition in the config |
--dry-run | push: plan only, change nothing |
--verbose | plan: also list unchanged docs and files |
Flags override the edition's config. Without a config file, pass a source and a target directly: linopress push --typedoc typedoc.json --team <teamId>.