Minor Changes
-
#1784
68f56a7
Thanks @HiDeoo! - Adds<LinkButton>
component for visually distinct and emphasized call to action links -
#2150
9368494
Thanks @delucis! - Adds state persistence across page navigations to the main site sidebar -
#2087
caa84ea
Thanks @HiDeoo! - Adds persistence to synced<Tabs>
so that a user's choices are reflected across page navigations. -
#2051
ec3b579
Thanks @HiDeoo! - Adds a guideline to the last step of the<Steps>
component.If you want to preserve the previous behaviour and hide the guideline on final steps, you can add the following custom CSS to your site:
/* Hide the guideline for the final step in <Steps> lists. */ .sl-steps > li:last-of-type::after { background: transparent; }
-
#1784
68f56a7
Thanks @HiDeoo! - Changes the hero component action button default variant fromminimal
toprimary
.⚠️ BREAKING CHANGE: If you want to preserve the previous appearance, hero component action buttons previously declared without a
variant
will need to be updated to include thevariant
property with the valueminimal
.hero: actions: - text: View on GitHub link: https://github.com/astronaut/my-project icon: external + variant: minimal
-
#2168
e044fee
Thanks @HiDeoo! - ⚠️ BREAKING CHANGE: Updates the<StarlightPage />
componentsidebar
prop to accept an array ofSidebarItem
s like the main Starlightsidebar
configuration inastro.config.mjs
.This change simplifies the definition of sidebar items in the
<StarlightPage />
component, allows for shared sidebar configuration between the globalsidebar
option and<StarlightPage />
component, and also enables the usage of autogenerated sidebar groups with the<StarlightPage />
component.
If you are using the<StarlightPage />
component with a customsidebar
configuration, you will need to update thesidebar
prop to an array ofSidebarItem
objects.For example, the following custom page with a custom
sidebar
configuration defines a “Resources” group with a “New” badge, a link to the “Showcase” page which is part of thedocs
content collection, and a link to the Starlight website:--- // src/pages/custom-page/example.astro --- <StarlightPage frontmatter={{ title: 'My custom page' }} sidebar={[ { type: 'group', label: 'Resources', badge: { text: 'New' }, items: [ { type: 'link', label: 'Showcase', href: '/showcase/' }, { type: 'link', label: 'Starlight', href: 'https://starlight.astro.build/', }, ], }, ]} > <p>This is a custom page with a custom component.</p> </StarlightPage>
This configuration will now need to be updated to the following:
--- // src/pages/custom-page/example.astro --- <StarlightPage frontmatter={{ title: 'My custom page' }} sidebar={[ { label: 'Resources', badge: { text: 'New' }, items: [ 'showcase', { label: 'Starlight', link: 'https://starlight.astro.build/' }, ], }, ]} > <p>This is a custom page with a custom component.</p> </StarlightPage>
See the “Sidebar Navigation” guide to learn more about the available options for customizing the sidebar.