Skip to content

Commit c8ea375

Browse files
authored
chore: bump dependencies and update PageSidebar implementation (#524)
1 parent b8a4a09 commit c8ea375

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
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",
@@ -22,6 +22,6 @@
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
}
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
2-
import type { Props } from '@astrojs/starlight/props';
32
import Default from '@astrojs/starlight/components/PageSidebar.astro';
43
54
const 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 />

0 commit comments

Comments
 (0)