Check this out
Interesting content you want to highlight.
Example content for the Starlight components get from the Starlight documentation.
npm create astro@latest -- --template starlight
npm install
import { Code } from '@astrojs/starlight/components';
export const exampleCode = `console.log('This could come from a file or CMS!');`;export const fileName = 'example.js';export const highlights = ['file', 'CMS'];
<Code code={exampleCode} lang="js" title={fileName} mark={highlights} />>
function demo() { console.log('this line is marked as deleted'); // This line and the next one are marked as inserted console.log('this is the second inserted line');
return 'this line uses the neutral default marker type';}
function demo() { // Mark any given text inside lines return 'Multiple matches of the given text are supported';}
Check this out
Stars
Sirius, Vega, Betelgeuse
Moons
Io, Europa, Ganymede
Sirius, Vega, Betelgeuse
Io, Europa, Ganymede
Import the component into your MDX file:
import { Steps } from '@astrojs/starlight/components';
Wrap <Steps>
around your ordered list items.
You can find more icons in the Starlight documentation.