Skip to content

Commit d3fd8b3

Browse files
andrewseguinmmalerba
authored andcommitted
docs: add package ID prefix to h3's ids (#17527)
This helps avoid collisions in the table of content's sections like "Directives" and "Services", since now we may show more than one package entry point in docs (e.g. button and button-testing). Note that we chose not to add the prefix to individual class/constant/interface/etc names because it muddles the URL and is unlikely that we collide on these values.
1 parent 3fdab10 commit d3fd8b3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tools/dgeni/templates/entry-point.template.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ <h2>
4343
</p>
4444

4545
{%- if doc.services.length -%}
46-
<h3 id="services" class="docs-header-link docs-api-h3">
46+
<h3 id="{$ doc.name $}-services" class="docs-header-link docs-api-h3">
4747
<span header-link="services"></span>
4848
Services
4949
</h3>
@@ -54,7 +54,7 @@ <h3 id="services" class="docs-header-link docs-api-h3">
5454

5555

5656
{%- if doc.directives.length -%}
57-
<h3 id="directives" class="docs-header-link docs-api-h3">
57+
<h3 id="{$ doc.name $}-directives" class="docs-header-link docs-api-h3">
5858
<span header-link="directives"></span>
5959
Directives
6060
</h3>
@@ -64,7 +64,7 @@ <h3 id="directives" class="docs-header-link docs-api-h3">
6464
{%- endif -%}
6565

6666
{%- if doc.classes.length -%}
67-
<h3 id="classes" class="docs-header-link docs-api-h3">
67+
<h3 id="{$ doc.name $}-classes" class="docs-header-link docs-api-h3">
6868
<span header-link="classes"></span>
6969
Classes
7070
</h3>
@@ -74,7 +74,7 @@ <h3 id="classes" class="docs-header-link docs-api-h3">
7474
{%- endif -%}
7575

7676
{%- if doc.interfaces.length -%}
77-
<h3 id="interfaces" class="docs-header-link docs-api-h3">
77+
<h3 id="{$ doc.name $}-interfaces" class="docs-header-link docs-api-h3">
7878
<span header-link="interfaces"></span>
7979
Interfaces
8080
</h3>
@@ -84,7 +84,7 @@ <h3 id="interfaces" class="docs-header-link docs-api-h3">
8484
{%- endif -%}
8585

8686
{%- if doc.functions.length -%}
87-
<h3 id="functions" class="docs-header-link docs-api-h3">
87+
<h3 id="{$ doc.name $}-functions" class="docs-header-link docs-api-h3">
8888
<span header-link="functions"></span>
8989
Functions
9090
</h3>
@@ -98,7 +98,7 @@ <h3 id="functions" class="docs-header-link docs-api-h3">
9898
{%- endif -%}
9999

100100
{%- if doc.typeAliases.length -%}
101-
<h3 id="type_aliases" class="docs-header-link docs-api-h3">
101+
<h3 id="{$ doc.name $}-type_aliases" class="docs-header-link docs-api-h3">
102102
<span header-link="type_aliases"></span>
103103
Type aliases
104104
</h3>
@@ -108,7 +108,7 @@ <h3 id="type_aliases" class="docs-header-link docs-api-h3">
108108
{%- endif -%}
109109

110110
{%- if doc.constants.length -%}
111-
<h3 id="constants" class="docs-header-link docs-api-h3">
111+
<h3 id="{$ doc.name $}-constants" class="docs-header-link docs-api-h3">
112112
<span header-link="constants"></span>
113113
Constants
114114
</h3>

0 commit comments

Comments
 (0)