UNPKG

typedoc-plugin-markdown

Version:

A TypeDoc plugin that generates TypeScript API documentation as Markdown.

24 lines (23 loc) • 914 B
export function index(page) { const md = []; // The separate README page fires the generic page hooks; "index.page.*" // stays on the project page rendered by the reflection template. md.push(this.hook('page.begin', this).join('\n')); if (!this.options.getValue('hidePageHeader')) { md.push(this.partials.header()); } if (!this.options.getValue('hideBreadcrumbs')) { md.push(this.partials.breadcrumbs()); } md.push(this.hook('content.begin', this).join('\n')); if (page.model.readme) { md.push(this.helpers.getCommentParts(page.model.readme)); } if (this.options.getValue('mergeReadme')) { md.push(this.partials.body(page.model, { headingLevel: 2 })); } md.push(this.hook('content.end', this).join('\n')); md.push(this.partials.footer()); md.push(this.hook('page.end', this).join('\n')); return md.join('\n\n'); }