Skip to content
@ng-doc/builder / Interface

NgDocConfiguration

NgDoc configuration interface, that configure NgDoc library

DeclarationTypeScript
export interface NgDocConfiguration { … }

Members

Properties

13
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. Only the Vite engine builds them.

By default only the pages with an isolated demo get them. true (or an object) builds them for every page with demos; false never builds them, and isolated demos 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.

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