Contributing
Have you made an example of how to do something with Starlight? We’d love to see it!
How to contribute
Section titled “How to contribute”-
Create an example on StackBlitz. Get started quickly with the Starlight template.
-
Download your example and add it to this repo in the
examples/directory. -
Add a new page to the
src/content/docs/examples/directory using the page template below. -
Open a PR adding your changes on GitHub.
By submitting an example, you accept for it to be published under the terms of the MIT License.
Page template
Section titled “Page template”Here’s a template you can use for a new page:
---title: Short titledescription: Description of what your example shows---
import StackBlitz from '../../../components/StackBlitz.astro';
Short introduction to your example.
<StackBlitz example="EXAMPLE-DIR" title="EXAMPLE TITLE" description="EXAMPLE DESCRIPTION" openFile="src/PageOverride.astro,astro.config.mjs"/>- Update the
titleanddescriptionprops and frontmatter to briefly describe your example. - Replace
EXAMPLE-DIRwith the name of the directory you created in theexamples/directory. - Update the value of the
openFileoption with paths to the files in your example a user will need to refer to. The syntax is a string of filepaths, separated by commas. Common examples here include:- custom components or overrides used in your example
astro.config.mjsif the example demonstrates specific configuration- content files that are using or describing your technique
- If needed, the
<StackBlitz>component also accepts the following boolean attributes:clickToLoad: defer loading the project until a user interacts with the embedshowSidebar: expand the IDE sidebar on load (only works on larger screens)