Skip to content

@astrojs/starlight@0.13.0

Compare
Choose a tag to compare
@astrobot-houston astrobot-houston released this 20 Nov 21:52
· 716 commits to main since this release
5b1b488

Minor Changes

  • #1023 a3b80f7 Thanks @kevinzunigacuellar! - Respect the trailingSlash and build.format Astro options when creating Starlight navigation links.

    鈿狅笍 Potentially breaking change:
    This change will cause small changes in link formatting for most sites.
    These are unlikely to break anything, but if you care about link formatting, you may want to change some Astro settings.

    If you want to preserve Starlight鈥檚 previous behavior, set trailingSlash: 'always' in your astro.config.mjs:

    import { defineConfig } from 'astro/config';
    import starlight from '@astrojs/starlight';
    
    export default defineConfig({
    	trailingSlash: 'always',
    	integrations: [
    		starlight({
    			// ...
    		}),
    	],
    });
  • #742 c6a4bcb Thanks @hippotastic! - Adds Expressive Code as Starlight鈥檚 default code block renderer

    鈿狅笍 Potentially breaking change:
    This addition changes how Markdown code blocks are rendered. By default, Starlight will now use Expressive Code.
    If you were already customizing how code blocks are rendered and don't want to use the features provided by Expressive Code, you can preserve the previous behavior by setting the new config option expressiveCode to false.

    If you had previously added Expressive Code manually to your Starlight project, you can now remove the manual set-up in astro.config.mjs:

    • Move your configuration to Starlight鈥檚 new expressiveCode option.
    • Remove the astro-expressive-code integration.

    For example:

    import starlight from '@astrojs/starlight';
    import { defineConfig } from 'astro/config';
    - import expressiveCode from 'astro-expressive-code';
    
    export default defineConfig({
      integrations: [
    -   expressiveCode({
    -     themes: ['rose-pine'],
    -   }),
        starlight({
          title: 'My docs',
    +     expressiveCode: {
    +       themes: ['rose-pine'],
    +     },
        }),
      ],
    });

    Note that the built-in Starlight version of Expressive Code sets some opinionated defaults that are different from the astro-expressive-code defaults. You may need to set some styleOverrides if you wish to keep styles exactly the same.

  • #517 5b549cb Thanks @liruifengv! - Add i18n support for default aside labels

Patch Changes