Skip to content

Getting Started

A Starlight plugin to render GitHub alerts as Starlight asides in your Markdown and MDX content.

Check out the demo for a preview of the plugin in action.

You will need to have a Starlight website set up. If you don’t have one yet, you can follow the “Getting Started” guide in the Starlight docs to create one.

  1. Starlight GitHub Alerts is a Starlight plugin. Install it using your favorite package manager:

    Terminal window
    npm i starlight-github-alerts
  2. Add the plugin to your Starlight configuration in the astro.config.mjs file.

    astro.config.mjs
    // @ts-check
    import starlight from '@astrojs/starlight'
    import { defineConfig } from 'astro/config'
    import starlightGitHubAlerts from 'starlight-github-alerts'
    export default defineConfig({
    integrations: [
    starlight({
    plugins: [starlightGitHubAlerts()],
    title: 'My Docs',
    }),
    ],
    })
  3. Start the development server to preview GitHub alerts rendered as Starlight asides.

    > [!NOTE]
    > Useful information that users should know, even when skimming content.
    Preview

Check the configuration reference for more information on the available options to customize how GitHub alerts should be rendered.