How to use the typedoc.NavigationItem function in typedoc

To help you get started, we’ve selected a few typedoc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tom-grey / typedoc-plugin-markdown / src / theme.ts View on Github external
group?,
    ) {
      let navigationGroup: NavigationItem;
      if (group) {
        navigationGroup = group;
      } else {
        navigationGroup = getNavigationGroup(reflection);
      }
      let titlePrefix = '';
      if (longTitle && parentNavigationItem && parentNavigationItem.title) {
        titlePrefix = parentNavigationItem.title.replace(/\"/g, '') + '.';
      }

      const title = titlePrefix + reflection.name.replace(/\"/g, '');
      const url = reflection.url;
      const nav = new NavigationItem(title, url, parentNavigationItem);
      nav.parent = parentNavigationItem;

      navigationGroup.children.push(nav);
      if (reflection.children) {
        reflection.children.forEach(reflectionChild => {
          if (reflectionChild.hasOwnDocument) {
            addNavigationItem(longTitle, reflectionChild as DeclarationReflection, nav, navigationGroup);
          }
        });
      }
      delete nav.cssClasses;
      delete nav.reflection;
      return nav;
    }
    const isModules = this.application.options.getValue('mode') === 1;
github tom-grey / typedoc-plugin-markdown / src / theme.ts View on Github external
function createNavigationGroup(name: string, url = null) {
      const navigationGroup = new NavigationItem(name, url);
      navigationGroup.children = [];
      delete navigationGroup.cssClasses;
      delete navigationGroup.reflection;
      return navigationGroup;
    }