Mirror of
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #11 from trueberryless-org/unlisted-error-slug

Improve missing topic error messages

authored by

trueberryless and committed by
GitHub
4e1f5c7c 9eade5da

+7 -2
+5
.changeset/chilly-pots-cough.md
··· 1 + --- 2 + "starlight-sidebar-topics-dropdown": patch 3 + --- 4 + 5 + Improves missing topic error messages by including the slug of the relevant page
+2 -2
packages/starlight-sidebar-topics-dropdown/overrides/Sidebar.astro
··· 16 16 currentTopic = getCurrentTopic(config, sidebar, slug, entry) 17 17 if (!currentTopic) 18 18 throwPluginError( 19 - 'Failed to find the topic for the current page.', 20 - `Either include the page in the sidebar configuration of the desired topic using the \`items\` property or to associate an unlisted page with a topic, use the \`topic\` frontmatter property and set it to the desired topic ID. 19 + `Failed to find the topic for the \`${slug}\` page.`, 20 + `Either include this page in the sidebar configuration of the desired topic using the \`items\` property or to associate an unlisted page with a topic, use the \`topic\` frontmatter property and set it to the desired topic ID. 21 21 Learn more about unlisted pages in the ["Unlisted pages"](https://starlight-sidebar-topics.netlify.app/docs/guides/unlisted-pages/) guide.`, 22 22 ) 23 23 currentSidebar = currentTopic.sidebar