Skip to content

Commit

Permalink
chore: removed iana page's overview section
Browse files Browse the repository at this point in the history
  • Loading branch information
JoblersTune committed Nov 26, 2024
1 parent 25b3b74 commit 4a8fe2f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default defineConfig({
plugins: [starlightLinksValidator()],
components: {
Header: "./src/components/Header.astro",
PageSidebar: './src/components/PageSidebar.astro'
},
expressiveCode: {
styleOverrides: {
Expand Down
17 changes: 17 additions & 0 deletions 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 = [
'iana',
]
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 4a8fe2f

Please sign in to comment.