File tree Expand file tree Collapse file tree 2 files changed +13
-14
lines changed
Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Original file line number Diff line number Diff line change 11---
2- import type { Props } from ' @astrojs/starlight/props' ;
32import SiteTitle from " @astrojs/starlight/components/SiteTitle.astro" ;
43import Search from " @astrojs/starlight/components/Search.astro" ;
54import ThemeSelect from " @astrojs/starlight/components/ThemeSelect.astro" ;
65import SocialIcons from " @astrojs/starlight/components/SocialIcons.astro" ;
76---
87<div class =" header sl-flex" >
9- <SiteTitle { ... Astro . props } />
8+ <SiteTitle />
109 <div class =" secondary-wrap" >
11- <Search { ... Astro . props } />
12- <SocialIcons { ... Astro . props } />
10+ <Search />
11+ <SocialIcons />
1312 <div class =" sl-hidden md:sl-flex" >
14- <ThemeSelect { ... Astro . props } />
13+ <ThemeSelect />
1514 </div >
1615 </div >
1716</div >
Original file line number Diff line number Diff line change 11---
2- import type { Props } from ' @astrojs/starlight/props' ;
32import Default from ' @astrojs/starlight/components/PageSidebar.astro' ;
43
54const removeOverview = [
65 ' iana' ,
76]
8- const noOverview = removeOverview .includes (Astro .props .slug );
9- const toc = noOverview && Astro .props .toc !== undefined
10- ? {
11- ... Astro .props .toc ,
12- items: Astro .props .toc ?.items .slice (1 ),
13- }
14- : Astro .props .toc ;
7+ const { id, toc } = Astro .locals .starlightRoute ;
8+ const noOverview = removeOverview .includes (id );
9+ if (noOverview && toc ) {
10+ Astro .locals .starlightRoute .toc = {
11+ ... toc ,
12+ items: toc .items .slice (1 ),
13+ };
14+ }
1515---
1616
17- <Default { ... Astro . props } { toc }>< slot /></ Default >
17+ <Default / >
You can’t perform that action at this time.
0 commit comments