From f05f5485460125ca6cea8d89170d1cef0edbb6fc Mon Sep 17 00:00:00 2001 From: Martin Staffa Date: Thu, 5 Oct 2017 12:17:18 +0200 Subject: [PATCH 1/2] chore(doc-gen): improve headings for events and examples The "Events" heading now gets an id (which makes them show in the table of contents, and their "Parameters" use a heading with a lower priority (previously it was the same as "Events" itself). The "@example" tag now generates the heading "Example" if there's only one, or "Examples" if there are multiple. --- docs/config/templates/ngdoc/api/api.template.html | 2 +- docs/config/templates/ngdoc/lib/events.template.html | 6 +++--- docs/config/templates/ngdoc/lib/methods.template.html | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/config/templates/ngdoc/api/api.template.html b/docs/config/templates/ngdoc/api/api.template.html index aa28ffa056ab..0a622197b4e2 100644 --- a/docs/config/templates/ngdoc/api/api.template.html +++ b/docs/config/templates/ngdoc/api/api.template.html @@ -52,7 +52,7 @@

Dependencies

{% block examples %} {%- if doc.examples %} -

Examples

+

{$ "Examples" if doc.examples | length > 1 else "Example" $}

{%- for example in doc.examples -%} {$ example | marked $} {%- endfor -%} diff --git a/docs/config/templates/ngdoc/lib/events.template.html b/docs/config/templates/ngdoc/lib/events.template.html index 962c315dc888..b4b159de5008 100644 --- a/docs/config/templates/ngdoc/lib/events.template.html +++ b/docs/config/templates/ngdoc/lib/events.template.html @@ -2,11 +2,11 @@ {% import "lib/deprecated.html" as x -%} {%- if doc.events %} -

Events

+

Events