Skip to content

Commit

Permalink
Merge branch 'main' into hd-remove-slash-search-shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
HiDeoo authored Jul 5, 2024
2 parents e4f1324 + 2bab648 commit aa92b0c
Show file tree
Hide file tree
Showing 64 changed files with 636 additions and 96 deletions.
9 changes: 9 additions & 0 deletions .changeset/great-plums-study.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@astrojs/starlight': minor
---

Makes sidebar entry parsing stricter in Starlight config

**⚠️ Potentially breaking change:** Previously Starlight would accept a sidebar entry that matched one of its expected shapes, even if it included additional properties. For example, including both `link` and `items` was considered valid, with `items` being ignored. Now, it is an error to include more than one of `link`, `items`, or `autogenerate` in a sidebar entry.

If you see errors after updating, look for sidebar entries in the Starlight configuration in `astro.config.mjs` that include too many keys and remove the one that was previously ignored.
5 changes: 5 additions & 0 deletions .changeset/new-trains-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@astrojs/starlight": patch
---

Updates the Ukrainian UI translations
41 changes: 35 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,32 @@ concurrency:

env:
NODE_VERSION: 18
ASTRO_TELEMETRY_DISABLED: true

jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
docs: ${{ steps.filter.outputs.docs }}
packages: ${{ steps.filter.outputs.packages }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
docs:
- 'docs/**'
packages:
- 'packages/**'
unit-test:
name: Run unit tests
runs-on: ubuntu-20.04
needs: changes
if: ${{ needs.changes.outputs.packages == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
Expand All @@ -31,8 +52,14 @@ jobs:
run: pnpm -r test:coverage

e2e-test:
name: Run E2E tests
runs-on: ubuntu-20.04
name: 'Run E2E tests (${{ matrix.os }})'
needs: changes
if: ${{ needs.changes.outputs.packages == 'true' }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
Expand All @@ -46,7 +73,7 @@ jobs:

type-check:
name: Run type checks
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
Expand All @@ -63,7 +90,7 @@ jobs:

pa11y:
name: Check for accessibility issues
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -107,7 +134,9 @@ jobs:

links:
name: Check for broken links
runs-on: ubuntu-20.04
needs: changes
if: ${{ needs.changes.outputs.docs == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ pnpm-debug.log*
# Vitest
__coverage__/

# Playwright
test-results/

# Vercel output
.vercel

Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"@astro-community/astro-embed-youtube": "^0.5.2",
"@astrojs/starlight": "workspace:*",
"@lunariajs/core": "^0.1.0",
"@lunariajs/core": "^0.1.1",
"@types/culori": "^2.0.0",
"astro": "^4.10.2",
"culori": "^3.2.0",
Expand Down
Binary file added docs/src/assets/showcase/docs.orama.com.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/src/assets/showcase/ee.qqv.com.au.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/showcase/tutorialkit.dev.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/showcase/www.devhealthos.com.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions docs/src/components/showcase-sites.astro
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,11 @@ import FluidGrid from './fluid-grid.astro';
<Card title="DMNO" href="https://dmno.dev" thumbnail="dmno.dev.png" />
<Card title="EspansoEdit" href="https://ee.qqv.com.au" thumbnail="ee.qqv.com.au.png" />
<Card title="how2neovim" href="https://how2neovim.io/" thumbnail="how2neovim.io.png" />
<Card title="TutorialKit" href="https://tutorialkit.dev/" thumbnail="tutorialkit.dev.png" />
<Card
title="The Dev Health OS"
href="https://www.devhealthos.com/"
thumbnail="www.devhealthos.com.png"
/>
<Card title="Orama" href="https://docs.orama.com/" thumbnail="docs.orama.com.png" />
</FluidGrid>
1 change: 1 addition & 0 deletions docs/src/content/docs/es/guides/site-search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ Para agregar traducciones de la UI al modal en otros idiomas, usa el [sistema de
"docsearch.searchBox.resetButtonAriaLabel": "Clear the query",
"docsearch.searchBox.cancelButtonText": "Cancel",
"docsearch.searchBox.cancelButtonAriaLabel": "Cancel",
"docsearch.searchBox.searchInputLabel": "Search",

"docsearch.startScreen.recentSearchesTitle": "Recent",
"docsearch.startScreen.noRecentSearchesText": "No recent searches",
Expand Down
10 changes: 10 additions & 0 deletions docs/src/content/docs/es/resources/plugins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ Amplia tu sitio con un plugins oficiales respaldados por el equipo de Starlight
title="starlight-view-modes"
description="Agrega diferentes capacidades de modo de vista a tu sitio de documentación."
/>
<LinkCard
href="https://github.com/HiDeoo/starlight-versions"
title="starlight-versions"
description="Agrega versiones a tus páginas de documentación de Starlight."
/>
<LinkCard
href="https://github.com/HiDeoo/starlight-theme-rapide"
title="starlight-theme-rapide"
description="Tema de Starlight inspirado en el tema Vitesse de Visual Studio Code."
/>
</CardGrid>

## Herramientas e integraciones de la comunidad
Expand Down
1 change: 1 addition & 0 deletions docs/src/content/docs/fr/guides/site-search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ Ajoutez des traductions de l'interface utilisateur de la modale pour votre langu
"docsearch.searchBox.resetButtonAriaLabel": "Clear the query",
"docsearch.searchBox.cancelButtonText": "Cancel",
"docsearch.searchBox.cancelButtonAriaLabel": "Cancel",
"docsearch.searchBox.searchInputLabel": "Search",

"docsearch.startScreen.recentSearchesTitle": "Recent",
"docsearch.startScreen.noRecentSearchesText": "No recent searches",
Expand Down
6 changes: 6 additions & 0 deletions docs/src/content/docs/fr/resources/community-content.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,11 @@ import YouTubeGrid from '~/components/youtube-grid.astro';
description:
"Dans cette vidéo, je passe en revue ce qui rend Starlight si cool et pourquoi vous voudriez l'essayer avec votre prochain projet.",
},
{
href: 'https://www.youtube.com/watch?v=Q1E4Gkt63ko',
title: 'Astro Starlight et emoji-blast avec Chris Swithinbank',
description:
"Chris, le créateur du thème de documentation Starlight pour Astro, m'aide à le configurer pour le nouveau site web d'emoji-blast. 🌟 🎇",
},
]}
/>
10 changes: 10 additions & 0 deletions docs/src/content/docs/fr/resources/plugins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ Les [modules d'extension](/fr/reference/plugins/) peuvent personnaliser la confi
title="starlight-view-modes"
description="Ajouter différents modes d'affichage à votre site web de documentation."
/>
<LinkCard
href="https://github.com/HiDeoo/starlight-versions"
title="starlight-versions"
description="Versionner vos pages de documentation Starlight."
/>
<LinkCard
href="https://github.com/HiDeoo/starlight-theme-rapide"
title="starlight-theme-rapide"
description="Thème Starlight inspiré du thème Vitesse pour Visual Studio Code."
/>
</CardGrid>

## Outils et intégrations communautaires
Expand Down
1 change: 1 addition & 0 deletions docs/src/content/docs/ko/guides/site-search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ Starlight에 내장된 [국제화 시스템](/ko/guides/i18n/#starlight-ui-번
"docsearch.searchBox.resetButtonAriaLabel": "Clear the query",
"docsearch.searchBox.cancelButtonText": "Cancel",
"docsearch.searchBox.cancelButtonAriaLabel": "Cancel",
"docsearch.searchBox.searchInputLabel": "Search",

"docsearch.startScreen.recentSearchesTitle": "Recent",
"docsearch.startScreen.noRecentSearchesText": "No recent searches",
Expand Down
6 changes: 6 additions & 0 deletions docs/src/content/docs/ko/resources/community-content.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,11 @@ import YouTubeGrid from '~/components/youtube-grid.astro';
description:
'이 비디오에서는 Starlight가 왜 그렇게 멋진지, 그리고 왜 다음 프로젝트에서 Starlight를 사용해 보고 싶은지 설명합니다.',
},
{
href: 'https://www.youtube.com/watch?v=Q1E4Gkt63ko',
title: 'Astro Starlight와 emoji-blast - Chris Swithinbank',
description:
'프레임워크 온 프레임워크인 Astro Starlight의 창시자 Chris가 새로운 emoji-blast 웹사이트를 설정하는 과정을 안내합니다. 🌟 🎇',
},
]}
/>
11 changes: 10 additions & 1 deletion docs/src/content/docs/ko/resources/plugins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,16 @@ Starlight 팀이 지원하는 공식 플러그인과 Starlight 사용자가 관
title="starlight-view-modes"
description="문서 웹사이트에 다양한 보기 모드 기능을 추가하세요."
/>

<LinkCard
href="https://github.com/HiDeoo/starlight-versions"
title="starlight-versions"
description="Starlight 문서 페이지 버전을 지정하세요."
/>
<LinkCard
href="https://github.com/HiDeoo/starlight-theme-rapide"
title="starlight-theme-rapide"
description="Visual Studio Code Vitesse 테마에서 영감을 받은 Starlight 테마입니다."
/>
</CardGrid>

## 커뮤니티 도구 및 통합
Expand Down
35 changes: 34 additions & 1 deletion docs/src/content/docs/pt-br/guides/components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -418,26 +418,59 @@ import { Steps } from '@astrojs/starlight/components';

</Steps>

### Emblemas

import { Badge } from '@astrojs/starlight/components';

Use o componente `<Badge>` para exibir pequenas informações, como status ou etiquetas.

Passe o conteúdo que deseja exibir para o atributo `text` do componente `<Badge>`.

Por padrão, o emblema usará a cor de destaque do tema do seu site. Para usar uma cor de emblema incorporada, defina o atributo `variant` com um dos seguintes valores: `note` (azul), `tip` (roxo), `danger` (vermelho), `caution` (laranja) ou `success` (verde).

O atributo `size` (padrão: `small`) controla o tamanho do texto do emblema. As opções `medium` e `large` também estão disponíveis para exibir um emblema maior.

Para personalização adicional, use outros atributos da tag `<span>` como `class` ou `style` com CSS personalizado.

```mdx title="src/content/docs/example.mdx"
import { Badge } from '@astrojs/starlight/components';

<Badge text="Novo" variant="tip" size="small" />
<Badge text="Obsoleto" variant="caution" size="medium" />
<Badge text="Starlight" variant="note" size="large" />
<Badge text="Personalizado" variant="success" style={{ fontStyle: 'italic' }} />
```

O código acima gera o seguinte conteúdo na página:

<Badge text="Novo" variant="tip" size="small" />
<Badge text="Obsoleto" variant="caution" size="medium" />
<Badge text="Starlight" variant="note" size="large" />
<Badge text="Personalizado" variant="success" style={{ fontStyle: 'italic' }} />

### Ícone

import { Icon } from '@astrojs/starlight/components';
import IconsList from '~/components/icons-list.astro';

Starlight providencia um conjunto comum de ícones que você pode mostrar em seu conteúdo utilizando o componente `<Icon>`.

Cada `<Icon>` requer um [`name`](#todos-os-ícones) e pode opcionalmente incluir um atributo `label`, `size` e `color`.
Cada `<Icon>` requer um [`name`](#todos-os-ícones) e pode opcionalmente incluir um atributo `label` para prover contexto aos leitores de tela.
Os atributos `size` e `color` podem ser utilizados para ajustar a aparência do ícone usando unidades CSS e valores de cores.

```mdx
# src/content/docs/exemplo.mdx

import { Icon } from '@astrojs/starlight/components';

<Icon name="star" color="goldenrod" size="2rem" />
<Icon name="rocket" color="var(--sl-color-text-accent)" />
```

O código acima gera o seguinte na página:

<Icon name="star" color="goldenrod" size="2rem" />
<Icon name="rocket" color="var(--sl-color-text-accent)" />

#### Todos os ícones

Expand Down
37 changes: 36 additions & 1 deletion docs/src/content/docs/pt-br/resources/plugins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,31 @@ Estenda o seu site com os plugins oficiais suportados pelo time Starlight e plug
title="starlight-ghostcms"
description="Adicione suas postagens do blog GhostCMS ao lado de suas páginas Starlight."
/>
<LinkCard
href="https://github.com/HiDeoo/starlight-image-zoom"
title="starlight-image-zoom"
description="Adicione recursos de zoom as imagens da sua documentação."
/>
<LinkCard
href="https://github.com/lorenzolewis/starlight-utils"
title="starlight-utils"
description="Estenda Starlight com uma coleção de utilitários comuns."
/>
<LinkCard
href="https://github.com/trueberryless/starlight-view-modes"
title="starlight-view-modes"
description="Adicione diferentes recursos de modo de exibição ao seu site de documentação."
/>
<LinkCard
href="https://github.com/HiDeoo/starlight-versions"
title="starlight-versions"
description="Versione suas páginas de documentação Starlight."
/>
<LinkCard
href="https://github.com/HiDeoo/starlight-theme-rapide"
title="starlight-theme-rapide"
description="Tema Starlight inspirado pelo tema Visual Studio Code Vitesse."
/>
</CardGrid>

## Ferramentas da comunidade e integrações
Expand Down Expand Up @@ -85,6 +110,16 @@ Essas ferramentas da comunidade e integrações podem ser usadas para adicionar
<LinkCard
href="https://github.com/HiDeoo/starlight-i18n"
title="starlight-i18n"
description="Visual Studio Code extension para ajudar a traduzir páginas Starlight."
description="Extensão para Visual Studio Code para ajudar a traduzir páginas Starlight."
/>
<LinkCard
href="https://github.com/HiDeoo/starlight-package-managers"
title="starlight-package-managers"
description="Exiba rapidamente comandos relacionados ao npm para vários gerenciadores de pacotes."
/>
<LinkCard
href="https://github.com/HiDeoo/starlight-showcases"
title="starlight-showcases"
description="Conjunto de componentes Starlight para criar páginas de exibição."
/>
</CardGrid>
2 changes: 1 addition & 1 deletion docs/src/content/docs/pt-br/resources/showcase.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar:

:::tip[Adicione o seu!]
Você construiu um site com Starlight?
Abra um PR adicionando um link para esta página!
[Abra um PR](https://github.com/withastro/starlight/blob/main/CONTRIBUTING.md#showcase) adicionando um link para esta página!
:::

## Sites
Expand Down
6 changes: 6 additions & 0 deletions docs/src/content/docs/resources/community-content.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,11 @@ import YouTubeGrid from '~/components/youtube-grid.astro';
description:
'In this video I go over what makes Starlight so cool and why you may want to give it a try on your next project.',
},
{
href: 'https://www.youtube.com/watch?v=Q1E4Gkt63ko',
title: 'Astro Starlight and emoji-blast with Chris Swithinbank',
description:
"Wherein Chris, the creator of Astro's Starlight framework-on-a-framework, walks me through setting it up for a new emoji-blast website. 🌟 🎇",
},
]}
/>
11 changes: 10 additions & 1 deletion docs/src/content/docs/resources/plugins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,16 @@ Extend your site with official plugins supported by the Starlight team and commu
title="starlight-view-modes"
description="Add different view mode capabilities to your documentation website."
/>

<LinkCard
href="https://github.com/HiDeoo/starlight-versions"
title="starlight-versions"
description="Version your Starlight documentation pages."
/>
<LinkCard
href="https://github.com/HiDeoo/starlight-theme-rapide"
title="starlight-theme-rapide"
description="Starlight theme inspired by the Visual Studio Code Vitesse theme."
/>
</CardGrid>

## Community tools and integrations
Expand Down
Loading

0 comments on commit aa92b0c

Please sign in to comment.