Docs Code Samples
Just a code block:
console.log('Hello world!')Code block with a filename and highlights:
console.log('This could come from a file or CMS!');Code blocks with tabs and different languages:
<h1>Hello world! My name is {{ $name }}</h1><?php echo 'Hello world!'; ?>console.log('Hello world!');body { color: red; }Steps:
-
Import the component into your MDX file:
import { Steps } from '@astrojs/starlight/components'; -
Wrap
<Steps>around your ordered list items.
Love these asides too:
See docs for starlight and expressive code for more examples.
- https://starlight.astro.build/components/using-components/ **
- https://starlight.astro.build/components/tabs/
- https://expressive-code.com/guides/themes/
- https://starlight.astro.build/guides/css-and-tailwind/#color-theme-editor
- https://starlight.astro.build/guides/css-and-tailwind/#tailwind-css
- ?? https://tailwindcss.com/docs/theme