Skip to content

Introduction

๐Ÿ‘‹ Welcome! NgDoc turns an Angular application into a documentation site for your components and APIs. You write guide pages in Markdown next to your code, and NgDoc adds live demos, playgrounds, API pages, links and search. It is built for authors of Angular libraries and design systems.

 What NgDoc can do

FeatureWhat you getLearn more
DemosAny Angular component rendered on the page, with its source code in tabs.Demos
PlaygroundsControls for a component's inputs, so readers can try every option.Playgrounds
API pagesA page for every exported class, function, interface and type in your sources.Generate API pages
KeywordsInline code such as NgDocPage becomes a link to its API page or guide page.Links and keywords
Code blocksNamed files, code groups, highlighted lines and code embedded from real files.Code blocks
DiagramsMermaid diagrams written as plain text.Diagrams
SearchFull-text search over guide pages and API pages.Search and command palette
ThemingLight, dark and custom themes through CSS variables.Themes and colors

 See it

This is a demo. NgDoc renders the component and shows its source code in tabs:

100% ร— auto
DraftIn reviewPublishedDeprecated

This is a playground for the same component. Change the values of its controls to update the preview:

Badge

Playground

Settings

Both come from a few lines in the page configuration. The Your first page tutorial builds them step by step.

How it fits together

NgDoc reads your documentation files, renders them into Angular code and writes that code into a generated folder. Your Angular application imports the generated routes and serves the site.

How NgDoc works explains each step.

Why NgDoc

Good documentation combines guides with examples and an API reference that stays in sync with the code. NgDoc keeps all three in one Angular application: guide pages link to API pages, API pages link back, and demos run the real components.

 Start here

  1. Installation: add NgDoc to an Angular application.
  2. Your first page: write a page with a demo, a playground and an API link.

Next: Installation

Edit this page