ember-cli-addon-docs icon indicating copy to clipboard operation
ember-cli-addon-docs copied to clipboard

New component that renders API docs for a project

Open gossi opened this issue 6 years ago • 0 comments

For now {{docs-viewer.nav}} helds the API reference. I propose to decouple this into a separate component:

{{! /addon/components/docs-viewer/x-api}}

{{!-- Autogenerated API docs --}}
      {{#if (gt project.modules.length 0)}}
        {{docs-viewer/x-section 'API Reference' style='large'}}

        {{#each-in project.navigationIndex as |type items|}}
          {{docs-viewer/x-section type}}

          {{#each items as |item|}}
            {{docs-viewer/x-nav-item (break-on item.name '/') (concat root '.api.item') item.path}}
          {{/each}}
        {{/each-in}}
    {{/if}}

Which will be invoked as {{docs-viewer.api @project=myProject @root='myproject'}}. It wouldn't even change the way the current component works, it just invokes the new component.

This would change the flexibility in which we can create docs. Some which I would need at the moment, because I run into this ;)

gossi avatar Jul 15 '18 11:07 gossi