···11+---
22+"starlight-sidebar-topics-dropdown": patch
33+---
44+55+Small fixes and docs changes
+18
docs/src/content/docs/docs/getting-started.mdx
···8383</Steps>
84848585The Starlight Sidebar Topics Dropdown plugin behavior can be tweaked using various [topic configuration options](/docs/configuration/#topic-configuration).
8686+8787+## Component overrides
8888+8989+The Starlight Sidebar Topics Dropdown plugin uses a Starlight [component override](https://starlight.astro.build/guides/overriding-components/) for the [`Sidebar`](https://starlight.astro.build/reference/overrides/#sidebar) component to add the dropdown which enables choosing between different topics.
9090+9191+If you have a custom `Sidebar` component override in your Starlight project, you will need to manually render the `Sidebar` component from the Starlight Sidebar Topics Dropdown plugin in your custom component:
9292+9393+```diff lang="astro"
9494+---
9595+// src/components/overrides/Sidebar.astro
9696+import Default from '@astrojs/starlight/components/Sidebar.astro'
9797++import StarlightSidebarTopicsDropdownSidebar from 'starlight-sidebar-topics-dropdown/components/Sidebar.astro'
9898+---
9999+100100++<StarlightSidebarTopicsDropdownSidebar />
101101+<p>Custom content in the Sidebar override</p>
102102+<Default><slot /></Default>
103103+```
···11-import type { StarlightUserConfig } from "@astrojs/starlight/types";
22-import type { AstroIntegrationLogger } from "astro";
31import { AstroError } from "astro/errors";
4253export function throwPluginError(message: string, hint?: string): never {
···97 `See the error report above for more informations.\n\nIf you believe this is a bug, please file an issue at https://github.com/trueberryless-org/starlight-sidebar-topics-dropdown/issues/new/choose`
108 );
119}
1212-1313-export function overrideStarlightComponent(
1414- components: StarlightUserConfig["components"],
1515- logger: AstroIntegrationLogger,
1616- component: keyof NonNullable<StarlightUserConfig["components"]>
1717-) {
1818- if (components?.[component]) {
1919- logger.warn(
2020- `It looks like you already have a \`${component}\` component override in your Starlight configuration.`
2121- );
2222- logger.warn(
2323- `To use \`starlight-sidebar-topics-dropdown\`, either remove your override or update it to render the content from \`starlight-sidebar-topics-dropdown/overrides/${component}.astro\`.`
2424- );
2525-2626- return {};
2727- }
2828-2929- return {
3030- [component]: `starlight-sidebar-topics-dropdown/overrides/${component}.astro`,
3131- };
3232-}
···1414 logger.warn(
1515 `To use \`starlight-sidebar-topics-dropdown\`, either remove your override or update it to render the content from \`starlight-sidebar-topics-dropdown/components/${component}.astro\`.`
1616 );
1717- // if (component === "DynamicVersionBadge") {
1818- // logger.warn(
1919- // "Notice that the `DynamicVersionBadge` component must be rendered AFTER the original Starlight `SiteTitle` component in the DOM. This ensures proper layout and behavior within the application."
2020- // );
2121- // }
22172318 return {};
2419 }