/** * Copyright 2017-present Palantir Technologies, Inc. All rights reserved. * Licensed under the BSD-3 License as modified (the “License”); you may obtain * a copy of the license in the LICENSE and PATENTS files in the root of this * repository. */ import { ICompiler, IFile, IMarkdownPluginData, IPlugin } from "../client"; export interface IMarkdownPluginOptions { /** * Page reference that lists the nav roots. * @default "_nav" */ navPage: string; } /** * The `MarkdownPlugin` parses and renders markdown pages and produces a navigation tree of all documents. * This plugin traces `@page` and `@#+` "heading" tags to discover pages (given a single starting `navPage`) * and build up a tree representation of those pages. * * @see IPageData (rendered markdown page) * @see IPageNode (node in navigation tree) */ export declare class MarkdownPlugin implements IPlugin { private options; constructor(options?: Partial); /** * Reads the given set of markdown files and adds their data to the internal storage. * Returns a plain object mapping page references to their data. */ compile(markdownFiles: IFile[], compiler: ICompiler): IMarkdownPluginData; private blockToPage; /** Convert each file to IPageData and populate store. */ private buildPageStore; /** * Computes `route` for the given `node` based on its parent. * If node is a page, then it also computes `route` for each heading and recurses through child * pages. */ private recurseRoute; private resolveRoutes; /** Iterates `contents` array and inlines any `@include page` tags. */ private resolveIncludeTags; }