Skip to content

chore(docs): adds toc to api docs #7827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tools/dgeni/templates/class.template.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<h4 class="docs-api-h4 docs-api-class-name">
<h4 id="{$ class.name $}" class="docs-header-link docs-api-h4 docs-api-class-name">
<span header-link="{$ class.name $}"></span>
<code>{$ class.name $}</code>
</h4>

Expand All @@ -16,7 +17,7 @@ <h4 class="docs-api-h4 docs-api-class-name">
{%- endif -%}

{%- if class.directiveExportAs -%}
<span class="docs-api-h4 docs-api-class-export-label">Exported as:</span>
<span class="docs-api-class-export-label">Exported as:</span>
<span class="docs-api-class-export-name">{$ class.directiveExportAs $}</span>
{%- endif -%}

Expand Down
15 changes: 12 additions & 3 deletions tools/dgeni/templates/componentGroup.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,31 @@ <h2>
</p>

{%- if doc.services.length -%}
<h3 class="docs-api-h3">Services</h3>
<h3 id="services" class="docs-header-link docs-api-h3">
<span header-link="services"></span>
Services
</h3>
{% for service in doc.services %}
{$ class(service) $}
{% endfor %}
{%- endif -%}


{%- if doc.directives.length -%}
<h3 class="docs-api-h3">Directives</h3>
<h3 id="directives" class="docs-header-link docs-api-h3">
<span header-link="directives"></span>
Directives
</h3>
{% for directive in doc.directives %}
{$ class(directive) $}
{% endfor %}
{%- endif -%}

{%- if doc.additionalClasses.length -%}
<h3 class="docs-api-h3">Additional classes</h3>
<h3 id="additional_classes" class="docs-header-link docs-api-h3">
<span header-link="additional_classes"></span>
Additional classes
</h3>
{% for other in doc.additionalClasses %}
{$ class(other) $}
{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion tools/gulp/tasks/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ task('markdown-docs', () => {
const escapedText = text.toLowerCase().replace(/[^\w]+/g, '-');
return `
<h${level} id="${escapedText}" class="docs-header-link">
<div header-link="${escapedText}"></div>
<span header-link="${escapedText}"></span>
${text}
</h${level}>
`;
Expand Down