diff --git a/astro.config.mjs b/astro.config.mjs index 4e9ed43780..f9996c4962 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -111,7 +111,7 @@ export default defineConfig({ ]) ], components: { - Sidebar: './src/components/sidebar.astro', + Sidebar: './src/components/Sidebar.astro', }, title: "setup.md", customCss: [ diff --git a/src/components/Sidebar.astro b/src/components/Sidebar.astro new file mode 100644 index 0000000000..781719678e --- /dev/null +++ b/src/components/Sidebar.astro @@ -0,0 +1,24 @@ +--- +import Default from '@astrojs/starlight/components/Sidebar.astro'; +import Search from '@astrojs/starlight/components/Search.astro'; +import SiteTitle from '@astrojs/starlight/components/SiteTitle.astro'; +import MobileMenuFooter from '@astrojs/starlight/components/MobileMenuFooter.astro'; +import config from 'virtual:starlight/user-config'; +import { TopicsDropdown } from 'starlight-sidebar-topics-dropdown'; + +const shouldRenderSearch = config.pagefind || config.components.Search !== '@astrojs/starlight/components/Search.astro'; +--- + +{/* (STARLIGHT-THEME-OBSIDIAN): Reorder site sidebar to always contain site title */} + + + \ No newline at end of file diff --git a/src/components/sidebar.astro b/src/components/sidebar.astro deleted file mode 100644 index 97249e95f5..0000000000 --- a/src/components/sidebar.astro +++ /dev/null @@ -1,9 +0,0 @@ ---- -import Default from '@astrojs/starlight/components/Sidebar.astro'; -import TopicsDropdown from 'starlight-sidebar-topics-dropdown/TopicsDropdown.astro'; ---- - -{/* Render the topics dropdown menu. */} - -{/* Render the default sidebar. */} - \ No newline at end of file