From d30cf75af523bbc666a582e8101fbf9e8d61e941 Mon Sep 17 00:00:00 2001
From: HiDeoo <494699+HiDeoo@users.noreply.github.com>
Date: Mon, 4 Nov 2024 11:04:32 +0100
Subject: [PATCH] fix: sidebar restoration with content after default sidebar
---
docs/astro.config.mjs | 2 +
docs/src/components/Sidebar.astro | 45 +++++++++++++++++++
packages/starlight/components/Page.astro | 16 ++++++-
.../components/SidebarPersister.astro | 9 ----
4 files changed, 62 insertions(+), 10 deletions(-)
create mode 100644 docs/src/components/Sidebar.astro
diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs
index 1cddfcecf2e..7331077be74 100644
--- a/docs/astro.config.mjs
+++ b/docs/astro.config.mjs
@@ -34,6 +34,8 @@ export default defineConfig({
trailingSlash: 'always',
integrations: [
starlight({
+ // TODO(HiDeoo) Remove
+ components: { Sidebar: './src/components/Sidebar.astro' },
title: 'Starlight',
logo: {
light: '/src/assets/logo-light.svg',
diff --git a/docs/src/components/Sidebar.astro b/docs/src/components/Sidebar.astro
new file mode 100644
index 00000000000..e2dd2a051d8
--- /dev/null
+++ b/docs/src/components/Sidebar.astro
@@ -0,0 +1,45 @@
+---
+// TODO(HiDeoo) Remove this entire file
+import type { Props } from '@astrojs/starlight/props';
+import Default from '@astrojs/starlight/components/Sidebar.astro';
+---
+
+