Skip to content

@wtf/project-typedoc

Documentation / @wtf/project-typedoc

A shared TypeDoc config for a docs package. It writes the markdown reference of the workspace’s packages into api/, with an llms.txt, links each source to its file in your repository at a git revision, and fails the build on a warning. TypeDoc, typedoc-plugin-markdown and typedoc-plugin-llms-txt are peer dependencies.

SubpathWhat you get
./configtypedocConfig(); gitRevisionOf(), the revision each source links to; and nodeRun, which runs git
./pluginscleanGeneratedMarkdown, preventMediaFiles and linkTrackedSources
packages/docs/typedoc.config.mjs
import { typedocConfig } from '@wtf/project-typedoc/config'
export default typedocConfig({
docs: import.meta.url,
repository: 'https://gitlab.com/wetryfun/project/project',
entryPoints: ['../core', '../cli']
})

Each source links to its file at --gitRevision <ref>, when you pass one to typedoc, and at the commit of HEAD otherwise. Pass a plugin of TypeDoc of your own in plugins, a function of the application or a module by its name: it runs after the preset’s own, and before typedoc-plugin-llms-txt and typedoc-plugin-markdown. See the presets guide.

Modules