Skip to content
@ng-doc/builder / Interface

NgDocConfiguration

NgDoc configuration interface, that configure NgDoc library

DeclarationTypeScript
export interface NgDocConfiguration { … }

Members

Properties

14
api?: NgDocApiConfiguration | undefined

The configuration for the API pages. Only the Vite engine reads it.

cache?: boolean | undefined

Determines whether to use the cache or not. (enabled by default)

demoApplication?: boolean | NgDocDemoApplicationConfiguration | undefined

The demo pages: one page per demo that loads only Angular and that demo, which isolated demos show in an iframe and "Open in new tab" opens, and one page per target of each playground, which isolated playgrounds show in iframes. Only the Vite engine builds them.

By default only the pages with an isolated demo or playground get them. true (or an object) builds the demo pages of every page with demos; playground pages are built only for isolated playgrounds. false never builds them, and isolated demos and playgrounds render in the page.

demoProviders?: NgDocDemoProvidersImport | undefined

Imports the module whose default export lists the providers of the demo pages, for example () => import('./demo.providers'). It must be written in ng-doc.config.ts as an arrow function that returns one import() of a file. NgDoc never calls it while it generates; the demo pages import the module. Only the Vite engine reads it.

docsPath?: string | undefined

Paths to your documentation location (e.g. "src/app")

guide?: NgDocGuideConfiguration | undefined

The configuration for the guides

isolatedDemos?: boolean | undefined

Shows every demo of the demo action in an iframe, as isolated: true does for one demo (false by default). It also builds a demo page for every demo. Only the Vite engine reads it.

isolatedPlaygrounds?: boolean | undefined

Renders the demos of every playground in iframes, as isolated: true does for one playground (false by default). It also builds the playground pages of every playground. Only the Vite engine reads it; the legacy engine renders playgrounds in the page.

keywords?: NgDocKeywordsConfiguration | undefined

The configuration for the global keywords.

outDir?: string | undefined

The path to the output directory, where the documentation will be generated. (e.g. 'src')

Remember that if you change this path, you also need to change the following:

  • Change the path to the @ng-doc/generated directory in tsconfig.json
  • Change the path to the ng-doc/app-name/assets folder in angular.json
repoConfig?: NgDocRepoConfig | undefined

The repository configuration. If it is defined, Ngoc will use it to display the "Suggest edits" button, and "View source" button, on each page.

routePrefix?: string | undefined

Route prefix uses to add some additional route segment before documentation pages, you can use it e.g. to wrap documentation with additional route like "docs".

shiki?: { themes: { light: string; dark: string; }; langs?: (NgDocShikiLanguage | readonly NgDocShikiLanguage[])[] | undefined; } | undefined

Shiki configuration

tsConfig?: string | undefined

The path to the tsconfig file (NgDoc uses tsconfig of your application by default, but you can override it)

Symbol
Kind
Interface
Scope
@ng-doc/builder
Edit this page