Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add links to "Open a PR" on resources pages (plugins.mdx & community-content.mdx) #2580

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 102 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,108 @@ To add a language, you will need its BCP-47 tag and a label. See [“Adding a ne
[vitest]: https://vitest.dev/
[playwright]: https://playwright.dev/

## Plugins and Integrations

It's great to see plugins and other integrations enhance or change features of Starlight.
We have a collection of plugins and tools on our [plugins](https://starlight.astro.build/resources/plugins/) page.
If you’ve built a Starlight plugin, theme or some other tool, adding it to the plugin page is just a pull request away!

1. Set up a development environment by following the [“Setting up a development environment”](#setting-up-a-development-environment) instructions.
2. Add a new entry for your plugin or tool in the right section in `docs/src/content/docs/resources/plugins.mdx`.

- The new entry must be appended at the end of an existing list.
- The `href` attribute must be the URL of your Starlight site. If your documentation is hosted on a subdomain or subdirectory, include that in the URL.
- The `title` attribute must be the name of your site with no extra details.
- The `description` attribute must be a short and accurate description of what your plugin or tool does or what your theme offers.

```diff
<LinkCard
href="https://github.com/ghost/starlight-plugin-example"
title="starlight-plugin-example"
description="Add blog to your documentation."
/>
<LinkCard
href="https://github.com/ghost/starlight-plugin-last-example"
title="starlight-plugin-last-example"
description="Add badge to your headings."
/>
+ <LinkCard
+ href="https://github.com/ghost/starlight-plugin-new-example"
+ title="starlight-plugin-new-example"
+ description="Add astronaut image to bottom right corner."
+ />
</CardGrid>
```

3. Open a pull request on GitHub to add your changes.

## Community Content

We love when people create content around Starlight and share it on our [community content](https://starlight.astro.build/resources/community-content/)
If you’ve published some content that's related to Starlight, adding it to the community content page is just a pull request away!

1. Set up a development environment by following the [“Setting up a development environment”](#setting-up-a-development-environment) instructions.
2. Add a new entry for your content in the right section in `docs/src/content/docs/resources/community-content.mdx`.

- The new entry must be appended at the end of an existing list.
- The `href` attribute must be the URL to your content (post on X, some blog, ...). If your documentation is hosted on a subdomain or subdirectory, include that in the URL.
- The `title` attribute must be the name of your site with no extra details.
- The `description` attribute must be a short and accurate description of what the content is about.

```diff
<LinkCard
href="https://example.net"
title="Content Example"
description="Some example of the community content list."
/>
<LinkCard
href="https://example.org"
title="Last Content Example"
description="Last example of the community content list."
/>
+ <LinkCard
+ href="https://example.com"
+ title="New Content Example"
+ description="New example of the community content list."
+ />
</CardGrid>
```

3. Open a pull request on GitHub to add your changes.

### Video Content

If the content you want to share is a YouTube video, you should add a new entry to the [video content section](https://starlight.astro.build/resources/community-content/#video-content). These entries differ in their properties. Therefore, step 2 is a little bit different:

1. Set up a development environment by following the [“Setting up a development environment”](#setting-up-a-development-environment) instructions.
2. Add a new entry for your content in the video section in `docs/src/content/docs/resources/community-content.mdx`.

- The new entry must be appended at the end of an existing list of the video content section.
- The `href` attribute must be the URL to your YouTube video.
- The `title` attribute must be the YouTube title.
- The `description` attribute must be a short and accurate description of the video. If the YouTube description of your video is short, you can copy and paste it.

```diff
{
href: 'https://www.youtube.com/watch?v=5u0Ds7wzUeI',
title: 'Starlight by Astro',
description: 'Watch the official Starlight launch video',
},
{
href: 'https://www.youtube.com/shorts/zjOWezSzd18',
title: '🌟 SUB 1 MINUTE RUN',
description: 'Watch Ben launch a new Starlight site in under a minute!',
},
+ {
+ href: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
+ title: 'Rick Astley - Never Gonna Give You Up (Official Music Video)k',
+ description: "The official video for “Never Gonna Give You Up” by Rick Astley.",
+ },
]}
```

3. Open a pull request on GitHub to add your changes. Just please don't try to add “Never Gonna Give You Up” by Rick Astley to our videos like the example above ;)

## Showcase

We love to see websites built with Starlight and share them with the community on our [showcase](https://starlight.astro.build/resources/showcase/) page.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/resources/community-content.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Discover community-produced guides, articles and videos to help you

:::tip[Add your own!]
Have you produced content about Starlight?
Open a PR adding a link to this page!
[Open a PR](https://github.com/withastro/starlight/blob/main/CONTRIBUTING.md#community-content) adding a link to this page!
:::

import { CardGrid, LinkCard } from '@astrojs/starlight/components';
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/resources/plugins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar:

:::tip[Add your own!]
Have you built a plugin or a tool for Starlight?
Open a PR adding a link to this page!
[Open a PR](https://github.com/withastro/starlight/blob/main/CONTRIBUTING.md#plugins-and-integrations) adding a link to this page!
:::

## Plugins
Expand Down
Loading