From 766c85967e09124238b99705e9ec8dd95382f840 Mon Sep 17 00:00:00 2001 From: Sarah Jones Date: Wed, 27 Nov 2024 14:46:32 +0200 Subject: [PATCH] chore: removed STREAM page's overview section (#98) --- astro.config.mjs | 1 + src/components/PageSidebar.astro | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/components/PageSidebar.astro diff --git a/astro.config.mjs b/astro.config.mjs index 27929a1..1d62ce0 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -39,6 +39,7 @@ export default defineConfig({ ], components: { Header: "./src/components/Header.astro", + PageSidebar: './src/components/PageSidebar.astro' }, social: { github: "https://github.com/interledger", diff --git a/src/components/PageSidebar.astro b/src/components/PageSidebar.astro new file mode 100644 index 0000000..8561a28 --- /dev/null +++ b/src/components/PageSidebar.astro @@ -0,0 +1,17 @@ +--- +import type { Props } from '@astrojs/starlight/props'; +import Default from '@astrojs/starlight/components/PageSidebar.astro'; + +const removeOverview = [ + 'rfcs/stream-protocol', +] +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; +--- + +