Skip to content

Commit 9ede9a3

Browse files
authored
fix(docs): TOC navigation renders correct headings (#2539)
1 parent c4c9287 commit 9ede9a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+149
-299
lines changed

docs/api/accordion-group.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ hide_table_of_contents: true
44
---
55
import Tabs from '@theme/Tabs';
66
import TabItem from '@theme/TabItem';
7+
import TOCInline from '@theme/TOCInline';
78

89
import Props from '@site/static/auto-generated/accordion-group/props.md';
910
import Events from '@site/static/auto-generated/accordion-group/events.md';
@@ -12,19 +13,15 @@ import Parts from '@site/static/auto-generated/accordion-group/parts.md';
1213
import CustomProps from '@site/static/auto-generated/accordion-group/custom-props.md';
1314
import Slots from '@site/static/auto-generated/accordion-group/slots.md';
1415

15-
16-
1716
import EncapsulationPill from '@components/page/api/EncapsulationPill';
18-
import APITOCInline from '@components/page/api/APITOCInline';
1917

2018
<EncapsulationPill type="shadow" />
2119

2220
<h2 className="table-of-contents__title">Contents</h2>
2321

24-
<APITOCInline
22+
<TOCInline
2523
toc={toc}
2624
maxHeadingLevel={2}
27-
autogenerated={[Props, Events, Methods, Parts, CustomProps, Slots]}
2825
/>
2926

3027

docs/api/action-sheet.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ demoSourceUrl: "https://github.com/ionic-team/ionic-docs/tree/main/static/demos/
66
---
77
import Tabs from '@theme/Tabs';
88
import TabItem from '@theme/TabItem';
9+
import TOCInline from '@theme/TOCInline';
910

1011
import Props from '@site/static/auto-generated/action-sheet/props.md';
1112
import Events from '@site/static/auto-generated/action-sheet/events.md';
@@ -20,16 +21,14 @@ import Slots from '@site/static/auto-generated/action-sheet/slots.md';
2021
</head>
2122

2223
import EncapsulationPill from '@components/page/api/EncapsulationPill';
23-
import APITOCInline from '@components/page/api/APITOCInline';
2424

2525
<EncapsulationPill type="scoped" />
2626

2727
<h2 className="table-of-contents__title">Contents</h2>
2828

29-
<APITOCInline
29+
<TOCInline
3030
toc={toc}
3131
maxHeadingLevel={2}
32-
autogenerated={[Props, Events, Methods, Parts, CustomProps, Slots]}
3332
/>
3433

3534

docs/api/app.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ hide_table_of_contents: true
44
---
55
import Tabs from '@theme/Tabs';
66
import TabItem from '@theme/TabItem';
7+
import TOCInline from '@theme/TOCInline';
78

89
import Props from '@site/static/auto-generated/app/props.md';
910
import Events from '@site/static/auto-generated/app/events.md';
@@ -18,16 +19,14 @@ import Slots from '@site/static/auto-generated/app/slots.md';
1819
</head>
1920

2021
import EncapsulationPill from '@components/page/api/EncapsulationPill';
21-
import APITOCInline from '@components/page/api/APITOCInline';
2222

2323

2424

2525
<h2 className="table-of-contents__title">Contents</h2>
2626

27-
<APITOCInline
27+
<TOCInline
2828
toc={toc}
2929
maxHeadingLevel={2}
30-
autogenerated={[Props, Events, Methods, Parts, CustomProps, Slots]}
3130
/>
3231

3332

docs/api/back-button.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ demoSourceUrl: "https://github.com/ionic-team/ionic-docs/tree/main/static/demos/
66
---
77
import Tabs from '@theme/Tabs';
88
import TabItem from '@theme/TabItem';
9+
import TOCInline from '@theme/TOCInline';
910

1011
import Props from '@site/static/auto-generated/back-button/props.md';
1112
import Events from '@site/static/auto-generated/back-button/events.md';
@@ -20,16 +21,14 @@ import Slots from '@site/static/auto-generated/back-button/slots.md';
2021
</head>
2122

2223
import EncapsulationPill from '@components/page/api/EncapsulationPill';
23-
import APITOCInline from '@components/page/api/APITOCInline';
2424

2525
<EncapsulationPill type="shadow" />
2626

2727
<h2 className="table-of-contents__title">Contents</h2>
2828

29-
<APITOCInline
29+
<TOCInline
3030
toc={toc}
3131
maxHeadingLevel={2}
32-
autogenerated={[Props, Events, Methods, Parts, CustomProps, Slots]}
3332
/>
3433

3534

docs/api/backdrop.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ demoSourceUrl: "https://github.com/ionic-team/ionic-docs/tree/main/static/demos/
66
---
77
import Tabs from '@theme/Tabs';
88
import TabItem from '@theme/TabItem';
9+
import TOCInline from '@theme/TOCInline';
910

1011
import Props from '@site/static/auto-generated/backdrop/props.md';
1112
import Events from '@site/static/auto-generated/backdrop/events.md';
@@ -14,19 +15,15 @@ import Parts from '@site/static/auto-generated/backdrop/parts.md';
1415
import CustomProps from '@site/static/auto-generated/backdrop/custom-props.md';
1516
import Slots from '@site/static/auto-generated/backdrop/slots.md';
1617

17-
18-
1918
import EncapsulationPill from '@components/page/api/EncapsulationPill';
20-
import APITOCInline from '@components/page/api/APITOCInline';
2119

2220
<EncapsulationPill type="shadow" />
2321

2422
<h2 className="table-of-contents__title">Contents</h2>
2523

26-
<APITOCInline
24+
<TOCInline
2725
toc={toc}
2826
maxHeadingLevel={2}
29-
autogenerated={[Props, Events, Methods, Parts, CustomProps, Slots]}
3027
/>
3128

3229

docs/api/breadcrumb.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ hide_table_of_contents: true
44
---
55
import Tabs from '@theme/Tabs';
66
import TabItem from '@theme/TabItem';
7+
import TOCInline from '@theme/TOCInline';
78

89
import Props from '@site/static/auto-generated/breadcrumb/props.md';
910
import Events from '@site/static/auto-generated/breadcrumb/events.md';
@@ -12,19 +13,15 @@ import Parts from '@site/static/auto-generated/breadcrumb/parts.md';
1213
import CustomProps from '@site/static/auto-generated/breadcrumb/custom-props.md';
1314
import Slots from '@site/static/auto-generated/breadcrumb/slots.md';
1415

15-
16-
1716
import EncapsulationPill from '@components/page/api/EncapsulationPill';
18-
import APITOCInline from '@components/page/api/APITOCInline';
1917

2018
<EncapsulationPill type="shadow" />
2119

2220
<h2 className="table-of-contents__title">Contents</h2>
2321

24-
<APITOCInline
22+
<TOCInline
2523
toc={toc}
2624
maxHeadingLevel={2}
27-
autogenerated={[Props, Events, Methods, Parts, CustomProps, Slots]}
2825
/>
2926

3027

docs/api/button.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ demoSourceUrl: "https://github.com/ionic-team/ionic-docs/tree/main/static/demos/
66
---
77
import Tabs from '@theme/Tabs';
88
import TabItem from '@theme/TabItem';
9+
import TOCInline from '@theme/TOCInline';
910

1011
import Props from '@site/static/auto-generated/button/props.md';
1112
import Events from '@site/static/auto-generated/button/events.md';
@@ -14,26 +15,23 @@ import Parts from '@site/static/auto-generated/button/parts.md';
1415
import CustomProps from '@site/static/auto-generated/button/custom-props.md';
1516
import Slots from '@site/static/auto-generated/button/slots.md';
1617

18+
import EncapsulationPill from '@components/page/api/EncapsulationPill';
19+
1720
<head>
1821
<title>ion-button: Design and Style Buttons with Custom CSS Properties</title>
1922
<meta name="description" content="ion-button provides a clickable element for use anywhere needing standard button functionality. Design and style button elements with custom CSS properties." />
2023
</head>
2124

22-
import EncapsulationPill from '@components/page/api/EncapsulationPill';
23-
import APITOCInline from '@components/page/api/APITOCInline';
2425

2526
<EncapsulationPill type="shadow" />
2627

2728
<h2 className="table-of-contents__title">Contents</h2>
2829

29-
<APITOCInline
30+
<TOCInline
3031
toc={toc}
3132
maxHeadingLevel={2}
32-
autogenerated={[Props, Events, Methods, Parts, CustomProps, Slots]}
3333
/>
3434

35-
36-
3735
Buttons provide a clickable element, which can be used in forms, or anywhere that needs simple, standard button functionality. They may display text, icons, or both. Buttons can be styled with several attributes to look a specific way.
3836

3937
## Expand

docs/api/buttons.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ hide_table_of_contents: true
44
---
55
import Tabs from '@theme/Tabs';
66
import TabItem from '@theme/TabItem';
7+
import TOCInline from '@theme/TOCInline';
78

89
import Props from '@site/static/auto-generated/buttons/props.md';
910
import Events from '@site/static/auto-generated/buttons/events.md';
@@ -18,16 +19,14 @@ import Slots from '@site/static/auto-generated/buttons/slots.md';
1819
</head>
1920

2021
import EncapsulationPill from '@components/page/api/EncapsulationPill';
21-
import APITOCInline from '@components/page/api/APITOCInline';
2222

2323
<EncapsulationPill type="scoped" />
2424

2525
<h2 className="table-of-contents__title">Contents</h2>
2626

27-
<APITOCInline
27+
<TOCInline
2828
toc={toc}
2929
maxHeadingLevel={2}
30-
autogenerated={[Props, Events, Methods, Parts, CustomProps, Slots]}
3130
/>
3231

3332

docs/api/card-content.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ hide_table_of_contents: true
44
---
55
import Tabs from '@theme/Tabs';
66
import TabItem from '@theme/TabItem';
7+
import TOCInline from '@theme/TOCInline';
78

89
import Props from '@site/static/auto-generated/card-content/props.md';
910
import Events from '@site/static/auto-generated/card-content/events.md';
@@ -12,19 +13,13 @@ import Parts from '@site/static/auto-generated/card-content/parts.md';
1213
import CustomProps from '@site/static/auto-generated/card-content/custom-props.md';
1314
import Slots from '@site/static/auto-generated/card-content/slots.md';
1415

15-
16-
1716
import EncapsulationPill from '@components/page/api/EncapsulationPill';
18-
import APITOCInline from '@components/page/api/APITOCInline';
19-
20-
2117

2218
<h2 className="table-of-contents__title">Contents</h2>
2319

24-
<APITOCInline
20+
<TOCInline
2521
toc={toc}
2622
maxHeadingLevel={2}
27-
autogenerated={[Props, Events, Methods, Parts, CustomProps, Slots]}
2823
/>
2924

3025

docs/api/card-header.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ hide_table_of_contents: true
44
---
55
import Tabs from '@theme/Tabs';
66
import TabItem from '@theme/TabItem';
7+
import TOCInline from '@theme/TOCInline';
78

89
import Props from '@site/static/auto-generated/card-header/props.md';
910
import Events from '@site/static/auto-generated/card-header/events.md';
@@ -12,19 +13,15 @@ import Parts from '@site/static/auto-generated/card-header/parts.md';
1213
import CustomProps from '@site/static/auto-generated/card-header/custom-props.md';
1314
import Slots from '@site/static/auto-generated/card-header/slots.md';
1415

15-
16-
1716
import EncapsulationPill from '@components/page/api/EncapsulationPill';
18-
import APITOCInline from '@components/page/api/APITOCInline';
1917

2018
<EncapsulationPill type="shadow" />
2119

2220
<h2 className="table-of-contents__title">Contents</h2>
2321

24-
<APITOCInline
22+
<TOCInline
2523
toc={toc}
2624
maxHeadingLevel={2}
27-
autogenerated={[Props, Events, Methods, Parts, CustomProps, Slots]}
2825
/>
2926

3027

0 commit comments

Comments
 (0)