File tree Expand file tree Collapse file tree 2 files changed +17
-17
lines changed
Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Original file line number Diff line number Diff line change 88 "astro" : " astro"
99 },
1010 "dependencies" : {
11- "@astrojs/react" : " ^4.2.3 " ,
12- "@astrojs/starlight" : " ^0.33 .0" ,
11+ "@astrojs/react" : " ^4.2.4 " ,
12+ "@astrojs/starlight" : " ^0.34 .0" ,
1313 "@interledger/docs-design-system" : " ^0.6.2" ,
14- "@types/react" : " ^19.1.0 " ,
15- "@types/react-dom" : " ^19.1.1 " ,
16- "astro" : " 5.6.1 " ,
14+ "@types/react" : " ^19.1.2 " ,
15+ "@types/react-dom" : " ^19.1.2 " ,
16+ "astro" : " 5.7.2 " ,
1717 "prettier" : " ^3.5.3" ,
1818 "prism-react-renderer" : " ^2.4.1" ,
1919 "react" : " ^19.1.0" ,
2222 "remark-mermaidjs" : " ^7.0.0" ,
2323 "respec" : " ^35.3.0" ,
2424 "sharp" : " ^0.34.1" ,
25- "starlight-links-validator" : " ^0.15 .0"
25+ "starlight-links-validator" : " ^0.16 .0"
2626 }
2727}
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 = [
6- ' docs/ resources/glossary' ,
5+ ' resources/glossary'
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+ console .log (id )
10+ if (noOverview && toc ) {
11+ Astro .locals .starlightRoute .toc = {
12+ ... toc ,
13+ items: toc .items .slice (1 ),
14+ };
15+ }
1516---
16-
17- <Default {... Astro .props } {toc }><slot /></Default >
17+ <Default />
You can’t perform that action at this time.
0 commit comments