Skip to content

Commit

Permalink
chore: removed Glossary page's overview section (#3136)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoblersTune authored Nov 27, 2024
1 parent 3bbe871 commit ad9ca7c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/documentation/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ export default defineConfig({
}
},
components: {
Header: './src/components/Header.astro'
Header: './src/components/Header.astro',
PageSidebar: './src/components/PageSidebar.astro'
},
head: [
{
Expand Down
17 changes: 17 additions & 0 deletions packages/documentation/src/components/PageSidebar.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
import type { Props } from '@astrojs/starlight/props';
import Default from '@astrojs/starlight/components/PageSidebar.astro';
const removeOverview = [
'resources/glossary',
]
const noOverview = removeOverview.includes(Astro.props.slug);
const toc = noOverview && Astro.props.toc !== undefined
? {
...Astro.props.toc,
items: Astro.props.toc?.items.slice(1),
}
: Astro.props.toc;
---

<Default {...Astro.props} {toc}><slot /></Default>

0 comments on commit ad9ca7c

Please sign in to comment.