diff --git a/.github/labeler.yml b/.github/labeler.yml index 6049ae3c76..4913a2e0e5 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -26,5 +26,8 @@ i18n: '🌟 tailwind': - packages/tailwind/** +'🌟 markdoc': + - packages/markdoc/** + '📚 docs': - docs/** diff --git a/docs/src/assets/showcase/docs.ryzekit.com.png b/docs/src/assets/showcase/docs.ryzekit.com.png new file mode 100644 index 0000000000..aa11fbf42f Binary files /dev/null and b/docs/src/assets/showcase/docs.ryzekit.com.png differ diff --git a/docs/src/assets/showcase/yummacss.com.png b/docs/src/assets/showcase/yummacss.com.png index 8511b5e289..f2ade0cddc 100644 Binary files a/docs/src/assets/showcase/yummacss.com.png and b/docs/src/assets/showcase/yummacss.com.png differ diff --git a/docs/src/components/showcase-sites.astro b/docs/src/components/showcase-sites.astro index 42d74e3bd5..4cf5b6079b 100644 --- a/docs/src/components/showcase-sites.astro +++ b/docs/src/components/showcase-sites.astro @@ -169,4 +169,9 @@ import FluidGrid from './fluid-grid.astro'; thumbnail="developers.cloudflare.com.png" /> + diff --git a/docs/src/content/docs/fr/guides/authoring-content.md b/docs/src/content/docs/fr/guides/authoring-content.mdx similarity index 83% rename from docs/src/content/docs/fr/guides/authoring-content.md rename to docs/src/content/docs/fr/guides/authoring-content.mdx index 34bf6d18cc..e64af988f9 100644 --- a/docs/src/content/docs/fr/guides/authoring-content.md +++ b/docs/src/content/docs/fr/guides/authoring-content.mdx @@ -202,8 +202,8 @@ Un bloc de code est indiqué par un bloc avec trois accents graves ``` + + +```sh +npm create astro@latest -- --template starlight/markdoc +``` + + + + +```sh +pnpm create astro --template starlight/markdoc +``` + + + + +```sh +yarn create astro --template starlight/markdoc +``` + + + + +### Ajouter Markdoc à un projet existant + +Si vous disposez déjà d'un site Starlight et que vous souhaitez ajouter Markdoc, suivez ces étapes. + + + +1. Ajoutez l'intégration Markdoc d'Astro : + + + + + + ```sh + npx astro add markdoc + ``` + + + + + + ```sh + pnpm astro add markdoc + ``` + + + + + + ```sh + yarn astro add markdoc + ``` + + + + + +2. Installez la préconfiguration Markdoc de Starlight : + + + + + + ```sh + npm install @astrojs/starlight-markdoc + ``` + + + + + + ```sh + pnpm add @astrojs/starlight-markdoc + ``` + + + + + + ```sh + yarn add @astrojs/starlight-markdoc + ``` + + + + + +3. Créez une configuration Markdoc dans le fichier `markdoc.config.mjs` et utilisez la préconfiguration Markdoc de Starlight : + + ```js + import { defineMarkdocConfig } from '@astrojs/markdoc/config'; + import starlightMarkdoc from '@astrojs/starlight-markdoc'; + + export default defineMarkdocConfig({ + extends: [starlightMarkdoc()], + }); + ``` + + + +Pour en savoir plus sur la syntaxe et les fonctionnalités de Markdoc, consultez la [documentation Markdoc](https://markdoc.dev/docs/syntax) ou le [guide de l'intégration Astro Markdoc](https://docs.astro.build/fr/guides/integrations-guide/markdoc/). diff --git a/docs/src/content/docs/fr/guides/pages.mdx b/docs/src/content/docs/fr/guides/pages.mdx index 5e3a29bb4d..992755537e 100644 --- a/docs/src/content/docs/fr/guides/pages.mdx +++ b/docs/src/content/docs/fr/guides/pages.mdx @@ -14,7 +14,7 @@ Ce guide montre comment fonctionne la génération de pages dans Starlight. ### Formats de fichiers Starlight prend en charge la création de contenu en Markdown et MDX sans aucune configuration requise. -Vous pouvez ajouter la prise en charge de Markdoc en installant l'intégration expérimentale [Astro Markdoc](https://docs.astro.build/fr/guides/integrations-guide/markdoc/). +Vous pouvez ajouter la prise en charge de Markdoc en suivant le [guide « Markdoc »](/fr/guides/authoring-content/#markdoc). ### Ajouter des pages diff --git a/docs/src/content/docs/fr/manual-setup.mdx b/docs/src/content/docs/fr/manual-setup.mdx index 1769109602..a3d14e1bab 100644 --- a/docs/src/content/docs/fr/manual-setup.mdx +++ b/docs/src/content/docs/fr/manual-setup.mdx @@ -125,6 +125,6 @@ import { FileTree } from '@astrojs/starlight/components'; ### Utiliser Starlight avec SSR -Vous pouvez utiliser Starlight en parallèle de pages personnalisées rendues à la demande dans votre projet en suivant le guide [« Adaptateurs de rendu à la demande »](https://docs.astro.build/fr/guides/server-side-rendering/) dans la documentation d'Astro. +Pour activer le SSR, suivez le guide [« Adaptateurs de rendu à la demande »](https://docs.astro.build/fr/guides/server-side-rendering/) dans la documentation d'Astro pour ajouter un adaptateur serveur à votre projet Starlight. -À l'heure actuelle, les pages de documentation générées par Starlight sont toujours pré-rendues, quel que soit le mode de rendu de votre projet. Nous espérons pouvoir bientôt supporter le rendu à la demande pour les pages de Starlight. +Les pages de documentation générées par Starlight sont pré-rendues par défaut, quel que soit le mode de rendu de votre projet. Pour désactiver le pré-rendu de vos pages Starlight, définissez [l'option de configuration `prerender`](/fr/reference/configuration/#prerender) à `false`. diff --git a/docs/src/content/docs/fr/reference/configuration.mdx b/docs/src/content/docs/fr/reference/configuration.mdx index d14660f8c8..dca7ffc520 100644 --- a/docs/src/content/docs/fr/reference/configuration.mdx +++ b/docs/src/content/docs/fr/reference/configuration.mdx @@ -455,6 +455,16 @@ Définit si le système de recherche du site par défaut de Starlight, [Pagefind Utilisez la valeur `false` pour désactiver l'indexation de votre site avec Pagefind. Cela désactivera également l'interface de recherche par défaut de Starlight si utilisée. +### `prerender` + +**Type :** `boolean` +**Par défaut :** `true` + +Définit si les pages générées par Starlight doivent être pré-rendues en HTML statique ou rendues à la demande par un [adaptateur SSR](https://docs.astro.build/fr/guides/server-side-rendering/). + +Les pages Starlight sont pré-rendues par défaut. +Si vous utilisez un adaptateur SSR et que vous souhaitez générer les pages Starlight à la demande, définissez `prerender: false`. + ### `head` **Type :** [`HeadConfig[]`](#headconfig) diff --git a/docs/src/content/docs/guides/authoring-content.md b/docs/src/content/docs/guides/authoring-content.mdx similarity index 82% rename from docs/src/content/docs/guides/authoring-content.md rename to docs/src/content/docs/guides/authoring-content.mdx index 2fe848151a..58c6f081dd 100644 --- a/docs/src/content/docs/guides/authoring-content.md +++ b/docs/src/content/docs/guides/authoring-content.mdx @@ -203,8 +203,8 @@ A code block is indicated by a block with three backticks ``` at th ```js // Javascript code with syntax highlighting. var fun = function lang(l) { - dateformat.i18n = require('./lang/' + l); - return true; + dateformat.i18n = require('./lang/' + l); + return true; }; ``` @@ -212,8 +212,8 @@ var fun = function lang(l) { ```js // Javascript code with syntax highlighting. var fun = function lang(l) { - dateformat.i18n = require('./lang/' + l); - return true; + dateformat.i18n = require('./lang/' + l); + return true; }; ``` ```` @@ -241,16 +241,16 @@ Some of the most common examples are shown below: ```js {2-3} function demo() { - // This line (#2) and the next one are highlighted - return 'This is line #3 of this snippet'; + // This line (#2) and the next one are highlighted + return 'This is line #3 of this snippet'; } ``` ````md ```js {2-3} function demo() { - // This line (#2) and the next one are highlighted - return 'This is line #3 of this snippet'; + // This line (#2) and the next one are highlighted + return 'This is line #3 of this snippet'; } ``` ```` @@ -260,7 +260,7 @@ Some of the most common examples are shown below: ```js "Individual terms" /Even.*supported/ // Individual terms can be highlighted, too function demo() { - return 'Even regular expressions are supported'; + return 'Even regular expressions are supported'; } ``` @@ -268,7 +268,7 @@ Some of the most common examples are shown below: ```js "Individual terms" /Even.*supported/ // Individual terms can be highlighted, too function demo() { - return 'Even regular expressions are supported'; + return 'Even regular expressions are supported'; } ``` ```` @@ -277,18 +277,18 @@ Some of the most common examples are shown below: ```js "return true;" ins="inserted" del="deleted" function demo() { - console.log('These are inserted and deleted marker types'); - // The return statement uses the default marker type - return true; + console.log('These are inserted and deleted marker types'); + // The return statement uses the default marker type + return true; } ``` ````md ```js "return true;" ins="inserted" del="deleted" function demo() { - console.log('These are inserted and deleted marker types'); - // The return statement uses the default marker type - return true; + console.log('These are inserted and deleted marker types'); + // The return statement uses the default marker type + return true; } ``` ```` @@ -393,3 +393,118 @@ Starlight supports all other Markdown authoring syntax, such as lists and tables ## Advanced Markdown and MDX configuration Starlight uses Astro’s Markdown and MDX renderer built on remark and rehype. You can add support for custom syntax and behavior by adding `remarkPlugins` or `rehypePlugins` in your Astro config file. See [“Configuring Markdown and MDX”](https://docs.astro.build/en/guides/markdown-content/#configuring-markdown-and-mdx) in the Astro docs to learn more. + +## Markdoc + +Starlight supports authoring content in Markdoc using the experimental [Astro Markdoc integration](https://docs.astro.build/en/guides/integrations-guide/markdoc/) and the Starlight Markdoc preset. + +### Create a new project with Markdoc + +Start a new Starlight project with Markdoc pre-configured using `create astro`: + +import { Tabs, TabItem, Steps } from '@astrojs/starlight/components'; + + + + +```sh +npm create astro@latest -- --template starlight/markdoc +``` + + + + +```sh +pnpm create astro --template starlight/markdoc +``` + + + + +```sh +yarn create astro --template starlight/markdoc +``` + + + + +### Add Markdoc to an existing project + +If you already have a Starlight site and want to add Markdoc, follow these steps. + + + +1. Add Astro’s Markdoc integration: + + + + + + ```sh + npx astro add markdoc + ``` + + + + + + ```sh + pnpm astro add markdoc + ``` + + + + + + ```sh + yarn astro add markdoc + ``` + + + + + +2. Install the Starlight Markdoc preset: + + + + + + ```sh + npm install @astrojs/starlight-markdoc + ``` + + + + + + ```sh + pnpm add @astrojs/starlight-markdoc + ``` + + + + + + ```sh + yarn add @astrojs/starlight-markdoc + ``` + + + + + +3. Create a Markdoc configuration file at `markdoc.config.mjs` and use the Starlight Markdoc preset: + + ```js + import { defineMarkdocConfig } from '@astrojs/markdoc/config'; + import starlightMarkdoc from '@astrojs/starlight-markdoc'; + + export default defineMarkdocConfig({ + extends: [starlightMarkdoc()], + }); + ``` + + + +To learn more about the Markdoc syntax and features, see the [Markdoc documentation](https://markdoc.dev/docs/syntax) or the [Astro Markdoc integration guide](https://docs.astro.build/en/guides/integrations-guide/markdoc/). diff --git a/docs/src/content/docs/guides/pages.mdx b/docs/src/content/docs/guides/pages.mdx index f112a5722f..663bea68a1 100644 --- a/docs/src/content/docs/guides/pages.mdx +++ b/docs/src/content/docs/guides/pages.mdx @@ -14,7 +14,7 @@ This guide shows how page generation works in Starlight. ### File formats Starlight supports authoring content in Markdown and MDX with no configuration required. -You can add support for Markdoc by installing the experimental [Astro Markdoc integration](https://docs.astro.build/en/guides/integrations-guide/markdoc/). +You can add support for Markdoc by following the [“Markdoc” guide](/guides/authoring-content/#markdoc). ### Add pages diff --git a/docs/src/content/docs/ko/guides/authoring-content.md b/docs/src/content/docs/ko/guides/authoring-content.mdx similarity index 83% rename from docs/src/content/docs/ko/guides/authoring-content.md rename to docs/src/content/docs/ko/guides/authoring-content.mdx index 929deff09b..8898ec66f4 100644 --- a/docs/src/content/docs/ko/guides/authoring-content.md +++ b/docs/src/content/docs/ko/guides/authoring-content.mdx @@ -204,8 +204,8 @@ Starlight의 유용한 기능 덕분에 사용자의 생산성이 향상되고 ```js // 구문 강조 기능이 있는 Javascript 코드입니다. var fun = function lang(l) { - dateformat.i18n = require('./lang/' + l); - return true; + dateformat.i18n = require('./lang/' + l); + return true; }; ``` @@ -213,8 +213,8 @@ var fun = function lang(l) { ```js // 구문 강조 기능이 있는 Javascript 코드입니다. var fun = function lang(l) { - dateformat.i18n = require('./lang/' + l); - return true; + dateformat.i18n = require('./lang/' + l); + return true; }; ``` ```` @@ -238,16 +238,16 @@ Expressive Code는 코드 샘플의 시각적 모습을 사용자 정의하기 ```js {2-3} function demo() { - // 이 줄(#2)과 다음 줄이 강조 표시됩니다. - return '이 줄은 이 스니펫의 라인 #3입니다.'; + // 이 줄(#2)과 다음 줄이 강조 표시됩니다. + return '이 줄은 이 스니펫의 라인 #3입니다.'; } ``` ````md ```js {2-3} function demo() { - // 이 줄(#2)과 다음 줄이 강조 표시됩니다. - return '이 줄은 이 스니펫의 라인 #3입니다.'; + // 이 줄(#2)과 다음 줄이 강조 표시됩니다. + return '이 줄은 이 스니펫의 라인 #3입니다.'; } ``` ```` @@ -257,7 +257,7 @@ Expressive Code는 코드 샘플의 시각적 모습을 사용자 정의하기 ```js "Individual terms" /정규.*지원됩니다./ // 개별 용어도 강조 표시할 수 있습니다. function demo() { - return '정규 표현식도 지원됩니다.'; + return '정규 표현식도 지원됩니다.'; } ``` @@ -265,7 +265,7 @@ Expressive Code는 코드 샘플의 시각적 모습을 사용자 정의하기 ```js "Individual terms" /정규.*지원됩니다./ // 개별 용어도 강조 표시할 수 있습니다. function demo() { - return '정규 표현식도 지원됩니다.'; + return '정규 표현식도 지원됩니다.'; } ``` ```` @@ -274,18 +274,18 @@ Expressive Code는 코드 샘플의 시각적 모습을 사용자 정의하기 ```js "return true;" ins="삽입" del="삭제된" function demo() { - console.log('삽입 및 삭제된 마커 타입입니다.'); - // return 문은 기본 마커 타입을 사용합니다. - return true; + console.log('삽입 및 삭제된 마커 타입입니다.'); + // return 문은 기본 마커 타입을 사용합니다. + return true; } ``` ````md ```js "return true;" ins="삽입" del="삭제된" function demo() { - console.log('삽입 및 삭제된 마커 타입입니다.'); - // return 문은 기본 마커 타입을 사용합니다. - return true; + console.log('삽입 및 삭제된 마커 타입입니다.'); + // return 문은 기본 마커 타입을 사용합니다. + return true; } ``` ```` @@ -390,3 +390,118 @@ Starlight는 목록 및 테이블과 같은 다른 모든 Markdown 작성 구문 ## 고급 Markdown 및 MDX 구성 Starlight는 remark 및 rehype를 기반으로 구축된 Astro의 Markdown 및 MDX 렌더러를 사용합니다. Astro 구성 파일에 `remarkPlugins` 또는 `rehypePlugins`를 추가하여 사용자 정의 구문 및 동작에 대한 지원을 추가할 수 있습니다. 자세한 내용은 Astro 문서의 [Markdown 및 MDX 구성](https://docs.astro.build/ko/guides/markdown-content/#configuring-markdown-and-mdx)을 참조하세요. + +## Markdoc + +Starlight는 실험적인 [Astro Markdoc 통합](https://docs.astro.build/ko/guides/integrations-guide/markdoc/)과 Starlight Markdoc 프리셋을 사용하여 Markdoc으로 콘텐츠를 작성할 수 있도록 지원합니다. + +### Markdoc으로 새 프로젝트 만들기 + +`create astro`를 사용하여 사전 구성된 Markdoc이 포함된 새 Starlight 프로젝트를 시작합니다: + +import { Tabs, TabItem, Steps } from '@astrojs/starlight/components'; + + + + +```sh +npm create astro@latest -- --template starlight/markdoc +``` + + + + +```sh +pnpm create astro --template starlight/markdoc +``` + + + + +```sh +yarn create astro --template starlight/markdoc +``` + + + + +### 기존 프로젝트에 Markdoc 추가하기 + +이미 Starlight 사이트가 있고 Markdoc을 추가하려는 경우 다음 단계를 따르세요. + + + +1. Astro의 Markdoc 통합을 추가하세요: + + + + + + ```sh + npx astro add markdoc + ``` + + + + + + ```sh + pnpm astro add markdoc + ``` + + + + + + ```sh + yarn astro add markdoc + ``` + + + + + +2. Starlight Markdoc 프리셋을 설치합니다: + + + + + + ```sh + npm install @astrojs/starlight-markdoc + ``` + + + + + + ```sh + pnpm add @astrojs/starlight-markdoc + ``` + + + + + + ```sh + yarn add @astrojs/starlight-markdoc + ``` + + + + + +3. `markdoc.config.mjs`에 Markdoc 구성 파일을 만들고 Starlight Markdoc 프리셋을 사용하세요: + + ```js + import { defineMarkdocConfig } from '@astrojs/markdoc/config'; + import starlightMarkdoc from '@astrojs/starlight-markdoc'; + + export default defineMarkdocConfig({ + extends: [starlightMarkdoc()], + }); + ``` + + + +Markdoc 구문 및 기능에 대한 자세한 내용은 [Markdoc 문서](https://markdoc.dev/docs/syntax) 또는 [Astro Markdoc 통합 가이드](https://docs.astro.build/ko/guides/integrations-guide/markdoc/)를 참조하세요. diff --git a/docs/src/content/docs/ko/guides/pages.mdx b/docs/src/content/docs/ko/guides/pages.mdx index f13583d34d..705569d0fe 100644 --- a/docs/src/content/docs/ko/guides/pages.mdx +++ b/docs/src/content/docs/ko/guides/pages.mdx @@ -14,7 +14,7 @@ Starlight는 Markdown Frontmatter를 통해 제공되는 유연한 옵션을 사 ### 파일 형식 Starlight는 구성이 필요 없는 Markdown 및 MDX 콘텐츠 작성을 지원합니다. -실험적인 [Astro Markdoc 통합](https://docs.astro.build/ko/guides/integrations-guide/markdoc/)을 설치하여 Markdoc에 대한 지원을 추가할 수 있습니다. +Markdoc에 대한 지원은 ["Markdoc" 가이드](/ko/guides/authoring-content/#markdoc)를 참조하여 추가할 수 있습니다. ### 페이지 추가 diff --git a/docs/src/content/docs/ko/manual-setup.mdx b/docs/src/content/docs/ko/manual-setup.mdx index fcc9e72326..eff195ddf8 100644 --- a/docs/src/content/docs/ko/manual-setup.mdx +++ b/docs/src/content/docs/ko/manual-setup.mdx @@ -123,6 +123,6 @@ import { FileTree } from '@astrojs/starlight/components'; ### SSR과 함께 Starlight 사용 -Astro 문서의 [“주문형 렌더링 어댑터”](https://docs.astro.build/ko/guides/server-side-rendering/) 안내서에 따라 프로젝트에서 사용자 정의 주문형 렌더링 페이지와 함께 Starlight를 사용할 수 있습니다. +SSR을 사용하려면 Astro 문서에 있는 ["주문형 렌더링 어댑터"](https://docs.astro.build/ko/guides/server-side-rendering/) 가이드에 따라 Starlight 프로젝트에 서버 어댑터를 추가하세요. -현재 Starlight에서 생성된 문서 페이지는 프로젝트의 출력 모드에 관계없이 항상 사전 렌더링됩니다. 곧 Starlight 페이지에 대한 주문형 렌더링을 지원할 수 있기를 바랍니다. +Starlight에서 생성된 문서 페이지는 프로젝트의 출력 모드에 관계없이 기본적으로 미리 렌더링됩니다. Starlight 페이지의 사전 렌더링을 선택 해제하려면 [`prerender` 구성 옵션](/ko/reference/configuration/#prerender)을 `false`로 설정하세요. diff --git a/docs/src/content/docs/ko/reference/configuration.mdx b/docs/src/content/docs/ko/reference/configuration.mdx index 2527d1893f..07000930fd 100644 --- a/docs/src/content/docs/ko/reference/configuration.mdx +++ b/docs/src/content/docs/ko/reference/configuration.mdx @@ -460,6 +460,18 @@ Starlight의 기본 사이트 검색 공급자인 [Pagefind](https://pagefind.ap Pagefind로 사이트 색인을 생성하지 않으려면 `false`로 설정하세요. 또한, 이는 기본 검색 UI도 숨깁니다. +[`prerender`](#prerender) 옵션이 `false`로 설정된 경우 Pagefind를 활성화할 수 없습니다. + +### `prerender` + +**타입:** `boolean` +**기본값:** `true` + +Starlight 페이지를 정적 HTML로 사전 렌더링할지, 아니면 [SSR 어댑터](https://docs.astro.build/ko/guides/server-side-rendering/)를 통해 주문형으로 렌더링할지 정의합니다. + +Starlight 페이지는 기본적으로 사전 렌더링됩니다. +SSR 어댑터를 사용 중이고 Starlight 페이지를 주문형으로 렌더링하기를 원한다면 `prerender: false`를 설정하세요. + ### `head` **타입:** [`HeadConfig[]`](#headconfig) diff --git a/docs/src/content/docs/manual-setup.mdx b/docs/src/content/docs/manual-setup.mdx index 0d7d50928d..07465d9f16 100644 --- a/docs/src/content/docs/manual-setup.mdx +++ b/docs/src/content/docs/manual-setup.mdx @@ -125,6 +125,6 @@ In the future, we plan to support this use case better to avoid the need for the ### Use Starlight with SSR -You can use Starlight alongside custom on-demand rendered pages in your project by following the [“On-demand Rendering Adapters”](https://docs.astro.build/en/guides/server-side-rendering/) guide in Astro’s docs. +To enable SSR, follow the [“On-demand Rendering Adapters”](https://docs.astro.build/en/guides/server-side-rendering/) guide in Astro’s docs to add a server adapter to your Starlight project. -Currently, documentation pages generated by Starlight are always prerendered regardless of your project's output mode. We hope to be able to support on-demand rendering for Starlight pages soon. +Documentation pages generated by Starlight are pre-rendered by default regardless of your project's output mode. To opt out of pre-rendering your Starlight pages, set the [`prerender` config option](/reference/configuration/#prerender) to `false`. diff --git a/docs/src/content/docs/reference/configuration.mdx b/docs/src/content/docs/reference/configuration.mdx index 8b97b0d35c..c878141b49 100644 --- a/docs/src/content/docs/reference/configuration.mdx +++ b/docs/src/content/docs/reference/configuration.mdx @@ -455,6 +455,18 @@ Define whether Starlight’s default site search provider [Pagefind](https://pag Set to `false` to disable indexing your site with Pagefind. This will also hide the default search UI if in use. +Pagefind cannot be enabled when the [`prerender`](#prerender) option is set to `false`. + +### `prerender` + +**type:** `boolean` +**default:** `true` + +Define whether Starlight pages should be pre-rendered to static HTML or on-demand rendered by an [SSR adapter](https://docs.astro.build/en/guides/server-side-rendering/). + +Starlight pages are pre-rendered by default. +If you are using an SSR adapter and want to render Starlight pages on demand, set `prerender: false`. + ### `head` **type:** [`HeadConfig[]`](#headconfig) diff --git a/docs/src/content/docs/ru/guides/authoring-content.md b/docs/src/content/docs/ru/guides/authoring-content.mdx similarity index 85% rename from docs/src/content/docs/ru/guides/authoring-content.md rename to docs/src/content/docs/ru/guides/authoring-content.mdx index c5f8ac2da5..0e12a3dbd8 100644 --- a/docs/src/content/docs/ru/guides/authoring-content.md +++ b/docs/src/content/docs/ru/guides/authoring-content.mdx @@ -203,8 +203,8 @@ Astro позволяет создавать быстрые сайты с пом ```js // Javascript код с подсветкой синтаксиса. var fun = function lang(l) { - dateformat.i18n = require('./lang/' + l); - return true; + dateformat.i18n = require('./lang/' + l); + return true; }; ``` @@ -212,8 +212,8 @@ var fun = function lang(l) { ```js // Javascript код с подсветкой синтаксиса. var fun = function lang(l) { - dateformat.i18n = require('./lang/' + l); - return true; + dateformat.i18n = require('./lang/' + l); + return true; }; ``` ```` @@ -241,16 +241,16 @@ Expressive Code предоставляет несколько вариантов ```js {2-3} function demo() { - // Эта строка (#2) и следующая выделены - return 'Это строка №3 этого фрагмента.'; + // Эта строка (#2) и следующая выделены + return 'Это строка №3 этого фрагмента.'; } ``` ````md ```js {2-3} function demo() { - // Эта строка (#2) и следующая выделены - return 'Это строка №3 этого фрагмента.'; + // Эта строка (#2) и следующая выделены + return 'Это строка №3 этого фрагмента.'; } ``` ```` @@ -260,7 +260,7 @@ Expressive Code предоставляет несколько вариантов ```js "Отдельные термины" /даже.*выражения/ // Отдельные термины также могут быть выделены function demo() { - return 'Поддерживаются даже регулярные выражения'; + return 'Поддерживаются даже регулярные выражения'; } ``` @@ -268,7 +268,7 @@ Expressive Code предоставляет несколько вариантов ```js "Отдельные термины" /даже.*выражения/ // Отдельные термины также могут быть выделены function demo() { - return 'Поддерживаются даже регулярные выражения'; + return 'Поддерживаются даже регулярные выражения'; } ``` ```` @@ -277,18 +277,18 @@ Expressive Code предоставляет несколько вариантов ```js "return true;" ins="вставленные" del="удалённые" function demo() { - console.log('Это вставленные и удалённые типы маркеров'); - // Оператор return использует тип маркера по умолчанию - return true; + console.log('Это вставленные и удалённые типы маркеров'); + // Оператор return использует тип маркера по умолчанию + return true; } ``` ````md ```js "return true;" ins="вставленные" del="удалённые" function demo() { - console.log('Это вставленные и удалённые типы маркеров'); - // Оператор return использует тип маркера по умолчанию - return true; + console.log('Это вставленные и удалённые типы маркеров'); + // Оператор return использует тип маркера по умолчанию + return true; } ``` ```` @@ -393,3 +393,118 @@ Starlight поддерживает все синтаксические возм ## Расширенная конфигурация Markdown и MDX Starlight использует Markdown и рендерер MDX от Astro, основанный на `remark` и `rehype`. Вы можете добавить поддержку пользовательского синтаксиса и поведения, добавив `remarkPlugins` или `rehypePlugins` в свой файл конфигурации Astro. Дополнительную информацию см. в разделе [Настройка Markdown и MDX](https://docs.astro.build/ru/guides/markdown-content/#%D0%BD%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0-markdown-%D0%B8-mdx) в документации Astro. + +## Markdoc + +Starlight поддерживает создание контента в Markdoc с помощью экспериментальной [интеграции с Astro](https://docs.astro.build/ru/guides/integrations-guide/markdoc/) и пресета Starlight Markdoc. + +### Создание нового проекта с Markdoc + +Начните новый проект Starlight с предварительно настроенным Markdoc с помощью команды `create astro`: + +import { Tabs, TabItem, Steps } from '@astrojs/starlight/components'; + + + + +```sh +npm create astro@latest -- --template starlight/markdoc +``` + + + + +```sh +pnpm create astro --template starlight/markdoc +``` + + + + +```sh +yarn create astro --template starlight/markdoc +``` + + + + +### Добавление Markdoc в существующий проект + +Если у вас уже есть сайт Starlight и вы хотите добавить Markdoc, выполните следующие действия. + + + +1. Добавьте интеграцию Markdoc: + + + + + + ```sh + npx astro add markdoc + ``` + + + + + + ```sh + pnpm astro add markdoc + ``` + + + + + + ```sh + yarn astro add markdoc + ``` + + + + + +2. Установите пресет Markdoc для Starlight: + + + + + + ```sh + npm install @astrojs/starlight-markdoc + ``` + + + + + + ```sh + pnpm add @astrojs/starlight-markdoc + ``` + + + + + + ```sh + yarn add @astrojs/starlight-markdoc + ``` + + + + + +3. Создайте файл конфигурации Markdoc по адресу `markdoc.config.mjs` и используйте пресет Markdoc: + + ```js + import { defineMarkdocConfig } from '@astrojs/markdoc/config'; + import starlightMarkdoc from '@astrojs/starlight-markdoc'; + + export default defineMarkdocConfig({ + extends: [starlightMarkdoc()], + }); + ``` + + + +Чтобы узнать больше о синтаксисе и возможностях Markdoc, смотрите [документацию](https://markdoc.dev/docs/syntax) или [Руководство по интеграции Markdoc в Astro](https://docs.astro.build/ru/guides/integrations-guide/markdoc/). diff --git a/docs/src/content/docs/ru/guides/css-and-tailwind.mdx b/docs/src/content/docs/ru/guides/css-and-tailwind.mdx index 99c5c0094f..95762bc79d 100644 --- a/docs/src/content/docs/ru/guides/css-and-tailwind.mdx +++ b/docs/src/content/docs/ru/guides/css-and-tailwind.mdx @@ -249,7 +249,9 @@ module.exports = { ### Редактор цветовой темы Используйте ползунки ниже, чтобы изменить палитры акцентного и серого цветов Starlight. -Темные и светлые области предпросмотра будут показывать результирующие цвета, и вся страница также обновится, чтобы показать ваши изменения. +Тёмные и светлые области предпросмотра будут показывать результирующие цвета, и вся страница также обновится, чтобы показать ваши изменения. + +Используйте параметр «Уровень контрастности», чтобы указать, какому из [стандартов цветовой контрастности](https://developer.mozilla.org/ru/docs/Web/Accessibility/Understanding_WCAG/Perceivable/Color_contrast) должен соответствовать веб-контент. Когда вы будете довольны внесёнными изменениями, скопируйте приведённый ниже код CSS или Tailwind и используйте его в своем проекте. @@ -266,6 +268,9 @@ import ThemeDesigner from '~/components/theme-designer.astro'; default: 'По умолчанию', random: 'Случайно', }, + contrast: { + label: 'Уровень контрастности', + }, editor: { accentColor: 'Акцентный цвет', grayColor: 'Серый', diff --git a/docs/src/content/docs/ru/guides/pages.mdx b/docs/src/content/docs/ru/guides/pages.mdx index 7926458422..d2b2b16a2f 100644 --- a/docs/src/content/docs/ru/guides/pages.mdx +++ b/docs/src/content/docs/ru/guides/pages.mdx @@ -14,7 +14,7 @@ Starlight генерирует HTML-страницы вашего сайта н ### Форматы файлов Starlight поддерживает создание контента в Markdown и MDX без необходимости настройки. -Вы можете добавить поддержку Markdoc, установив экспериментальную [интеграцию Astro Markdoc](https://docs.astro.build/ru/guides/integrations-guide/markdoc/). +Вы можете добавить поддержку Markdoc, следуя [руководству](/ru/guides/authoring-content/#markdoc). ### Добавление страниц diff --git a/docs/src/content/docs/ru/manual-setup.mdx b/docs/src/content/docs/ru/manual-setup.mdx index af8604430a..71d2540933 100644 --- a/docs/src/content/docs/ru/manual-setup.mdx +++ b/docs/src/content/docs/ru/manual-setup.mdx @@ -132,6 +132,6 @@ import { FileTree } from '@astrojs/starlight/components'; ### Использование Starlight с SSR -Вы можете использовать Starlight вместе со страницами, отображаемыми по требованию, в своем проекте, следуя руководству [Адаптеры рендеринга по требованию](https://docs.astro.build/ru/guides/server-side-rendering/) в документации Astro. +Чтобы включить SSR, следуйте руководству [Адаптеры рендеринга по требованию](https://docs.astro.build/ru/guides/server-side-rendering/) в документации Astro, для добавления серверного адаптера в ваш проект Starlight. -В настоящее время страницы документации, созданные Starlight, всегда предварительно обрабатываются независимо от режима вывода вашего проекта. Мы надеемся, что вскоре сможем поддерживать рендеринг по требованию для страниц Starlight. +Страницы документации, создаваемые Starlight, по умолчанию предварительно отрисовываются независимо от режима вывода вашего проекта. Для отключения предварительного рендеринга страниц установите для [параметра `prerender`](/ru/reference/configuration/#prerender) значение `false`. diff --git a/docs/src/content/docs/ru/reference/configuration.mdx b/docs/src/content/docs/ru/reference/configuration.mdx index 4b3890f7e0..a9a1f76b1a 100644 --- a/docs/src/content/docs/ru/reference/configuration.mdx +++ b/docs/src/content/docs/ru/reference/configuration.mdx @@ -449,11 +449,23 @@ starlight({ **тип:** `boolean` **по умолчанию:** `true` -Определите, включен ли в Starlight поставщик поиска по сайту по умолчанию [Pagefind](https://pagefind.app/). +Определите, включен ли в Starlight поставщик поиска по сайту по умолчанию — [Pagefind](https://pagefind.app/). Установите значение `false`, чтобы отключить индексацию вашего сайта с помощью Pagefind. Это также скроет стандартный пользовательский интерфейс поиска, если он используется. +Pagefind не может быть включен, если для параметра [`prerender`](#prerender) установлено значение `false`. + +### `prerender` + +**тип:** `boolean` +**по умолчанию:** `true` + +Определите, должны ли страницы Starlight предварительно отрисовываться в статический HTML или отрисовываться по требованию с помощью [SSR-адаптера](https://docs.astro.build/ru/guides/server-side-rendering/). + +Страницы Starlight предварительно отрисовываются по умолчанию. +Если вы используете адаптер SSR и хотите рендерить страницы Starlight по требованию, установите `prerender: false`. + ### `head` **тип:** [`HeadConfig[]`](#headconfig) diff --git a/examples/basics/package.json b/examples/basics/package.json index 0628092fc9..98bb457a9a 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "@astrojs/starlight": "^0.26.4", + "@astrojs/starlight": "^0.27.1", "astro": "^4.15.3", "sharp": "^0.32.5" } diff --git a/examples/markdoc/.gitignore b/examples/markdoc/.gitignore new file mode 100644 index 0000000000..6240da8b10 --- /dev/null +++ b/examples/markdoc/.gitignore @@ -0,0 +1,21 @@ +# build output +dist/ +# generated types +.astro/ + +# dependencies +node_modules/ + +# logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* + + +# environment variables +.env +.env.production + +# macOS-specific files +.DS_Store diff --git a/examples/markdoc/.vscode/extensions.json b/examples/markdoc/.vscode/extensions.json new file mode 100644 index 0000000000..a83595b151 --- /dev/null +++ b/examples/markdoc/.vscode/extensions.json @@ -0,0 +1,4 @@ +{ + "recommendations": ["astro-build.astro-vscode", "stripe.markdoc-language-support"], + "unwantedRecommendations": [] +} diff --git a/examples/markdoc/.vscode/launch.json b/examples/markdoc/.vscode/launch.json new file mode 100644 index 0000000000..d642209762 --- /dev/null +++ b/examples/markdoc/.vscode/launch.json @@ -0,0 +1,11 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "command": "./node_modules/.bin/astro dev", + "name": "Development server", + "request": "launch", + "type": "node-terminal" + } + ] +} diff --git a/examples/markdoc/README.md b/examples/markdoc/README.md new file mode 100644 index 0000000000..584fd88e05 --- /dev/null +++ b/examples/markdoc/README.md @@ -0,0 +1,56 @@ +# Starlight Starter Kit: Markdoc + +[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build) + +``` +npm create astro@latest -- --template starlight/markdoc +``` + +[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/starlight/tree/main/examples/markdoc) +[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/starlight/tree/main/examples/markdoc) +[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/withastro/starlight&create_from_path=examples/markdoc) +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fwithastro%2Fstarlight%2Ftree%2Fmain%2Fexamples%2Fmarkdoc&project-name=my-starlight-docs&repository-name=my-starlight-docs) + +> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun! + +## 🚀 Project Structure + +Inside of your Astro + Starlight project, you'll see the following folders and files: + +``` +. +├── public/ +├── src/ +│ ├── assets/ +│ ├── content/ +│ │ ├── docs/ +│ │ └── config.ts +│ └── env.d.ts +├── astro.config.mjs +├── markdoc.config.mjs +├── package.json +└── tsconfig.json +``` + +Starlight looks for `.md`, `.mdx` or `.mdoc` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name. + +Images can be added to `src/assets/` and embedded in Markdown with a relative link. + +Static assets, like favicons, can be placed in the `public/` directory. + +## 🧞 Commands + +All commands are run from the root of the project, from a terminal: + +| Command | Action | +| :------------------------ | :----------------------------------------------- | +| `npm install` | Installs dependencies | +| `npm run dev` | Starts local dev server at `localhost:4321` | +| `npm run build` | Build your production site to `./dist/` | +| `npm run preview` | Preview your build locally, before deploying | +| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | +| `npm run astro -- --help` | Get help using the Astro CLI | + +## 👀 Want to learn more? + +Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat). diff --git a/examples/markdoc/astro.config.mjs b/examples/markdoc/astro.config.mjs new file mode 100644 index 0000000000..03155ce5e6 --- /dev/null +++ b/examples/markdoc/astro.config.mjs @@ -0,0 +1,29 @@ +import { defineConfig } from 'astro/config'; +import starlight from '@astrojs/starlight'; +import markdoc from '@astrojs/markdoc'; + +// https://astro.build/config +export default defineConfig({ + integrations: [ + markdoc(), + starlight({ + title: 'My Docs', + social: { + github: 'https://github.com/withastro/starlight', + }, + sidebar: [ + { + label: 'Guides', + items: [ + // Each item here is one entry in the navigation menu. + { label: 'Example Guide', slug: 'guides/example' }, + ], + }, + { + label: 'Reference', + autogenerate: { directory: 'reference' }, + }, + ], + }), + ], +}); diff --git a/examples/markdoc/markdoc.config.mjs b/examples/markdoc/markdoc.config.mjs new file mode 100644 index 0000000000..ecda158d59 --- /dev/null +++ b/examples/markdoc/markdoc.config.mjs @@ -0,0 +1,7 @@ +import { defineMarkdocConfig } from '@astrojs/markdoc/config'; +import starlightMarkdoc from '@astrojs/starlight-markdoc'; + +// https://docs.astro.build/en/guides/integrations-guide/markdoc/ +export default defineMarkdocConfig({ + extends: [starlightMarkdoc()], +}); diff --git a/examples/markdoc/package.json b/examples/markdoc/package.json new file mode 100644 index 0000000000..df72c12d22 --- /dev/null +++ b/examples/markdoc/package.json @@ -0,0 +1,20 @@ +{ + "name": "@example/starlight-markdoc", + "type": "module", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "astro dev", + "start": "astro dev", + "build": "astro build", + "preview": "astro preview", + "astro": "astro" + }, + "dependencies": { + "@astrojs/markdoc": "^0.11.4", + "@astrojs/starlight": "^0.27.1", + "@astrojs/starlight-markdoc": "^0.1.0", + "astro": "^4.15.3", + "sharp": "^0.32.5" + } +} diff --git a/examples/markdoc/public/favicon.svg b/examples/markdoc/public/favicon.svg new file mode 100644 index 0000000000..cba5ac140a --- /dev/null +++ b/examples/markdoc/public/favicon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/examples/markdoc/src/assets/houston.webp b/examples/markdoc/src/assets/houston.webp new file mode 100644 index 0000000000..930c164974 Binary files /dev/null and b/examples/markdoc/src/assets/houston.webp differ diff --git a/examples/markdoc/src/content/config.ts b/examples/markdoc/src/content/config.ts new file mode 100644 index 0000000000..45f60b0154 --- /dev/null +++ b/examples/markdoc/src/content/config.ts @@ -0,0 +1,6 @@ +import { defineCollection } from 'astro:content'; +import { docsSchema } from '@astrojs/starlight/schema'; + +export const collections = { + docs: defineCollection({ schema: docsSchema() }), +}; diff --git a/examples/markdoc/src/content/docs/guides/example.mdoc b/examples/markdoc/src/content/docs/guides/example.mdoc new file mode 100644 index 0000000000..ebd0f3bc76 --- /dev/null +++ b/examples/markdoc/src/content/docs/guides/example.mdoc @@ -0,0 +1,11 @@ +--- +title: Example Guide +description: A guide in my new Starlight docs site. +--- + +Guides lead a user through a specific task they want to accomplish, often with a sequence of steps. +Writing a good guide requires thinking about what your users are trying to do. + +## Further reading + +- Read [about how-to guides](https://diataxis.fr/how-to-guides/) in the Diátaxis framework diff --git a/examples/markdoc/src/content/docs/index.mdoc b/examples/markdoc/src/content/docs/index.mdoc new file mode 100644 index 0000000000..814dc120ac --- /dev/null +++ b/examples/markdoc/src/content/docs/index.mdoc @@ -0,0 +1,35 @@ +--- +title: Welcome to Starlight +description: Get started building your docs site with Starlight. +template: splash +hero: + title: Welcome to Starlight with Markdoc + tagline: Congrats on setting up a new Starlight project! + image: + file: ../../assets/houston.webp + actions: + - text: Example Guide + link: /guides/example/ + icon: right-arrow + - text: Read the Starlight docs + link: https://starlight.astro.build + icon: external + variant: minimal +--- + +## Next steps + +{% cardgrid stagger=true %} +{% card title="Update content" icon="pencil" %} +Edit `src/content/docs/index.mdoc` to see this page change. +{% /card %} +{% card title="Add new content" icon="add-document" %} +Add Markdoc files to `src/content/docs` to create new pages. +{% /card %} +{% card title="Configure your site" icon="setting" %} +Edit your `sidebar` and other config in `astro.config.mjs`. +{% /card %} +{% card title="Read the docs" icon="open-book" %} +Learn more in [the Starlight Docs](https://starlight.astro.build/). +{% /card %} +{% /cardgrid %} diff --git a/examples/markdoc/src/content/docs/reference/example.mdoc b/examples/markdoc/src/content/docs/reference/example.mdoc new file mode 100644 index 0000000000..0224f096ce --- /dev/null +++ b/examples/markdoc/src/content/docs/reference/example.mdoc @@ -0,0 +1,11 @@ +--- +title: Example Reference +description: A reference page in my new Starlight docs site. +--- + +Reference pages are ideal for outlining how things work in terse and clear terms. +Less concerned with telling a story or addressing a specific use case, they should give a comprehensive outline of what you're documenting. + +## Further reading + +- Read [about reference](https://diataxis.fr/reference/) in the Diátaxis framework diff --git a/examples/markdoc/src/env.d.ts b/examples/markdoc/src/env.d.ts new file mode 100644 index 0000000000..e16c13c695 --- /dev/null +++ b/examples/markdoc/src/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/examples/markdoc/tsconfig.json b/examples/markdoc/tsconfig.json new file mode 100644 index 0000000000..bcbf8b5090 --- /dev/null +++ b/examples/markdoc/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "astro/tsconfigs/strict" +} diff --git a/examples/tailwind/package.json b/examples/tailwind/package.json index 935efb71f2..16b0ba64f1 100644 --- a/examples/tailwind/package.json +++ b/examples/tailwind/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "@astrojs/starlight": "^0.26.4", + "@astrojs/starlight": "^0.27.1", "@astrojs/starlight-tailwind": "^2.0.3", "@astrojs/tailwind": "^5.1.0", "astro": "^4.15.3", diff --git a/packages/markdoc/.npmignore b/packages/markdoc/.npmignore new file mode 100644 index 0000000000..c8740c5e4f --- /dev/null +++ b/packages/markdoc/.npmignore @@ -0,0 +1 @@ +__tests__/ diff --git a/packages/markdoc/CHANGELOG.md b/packages/markdoc/CHANGELOG.md new file mode 100644 index 0000000000..433575df48 --- /dev/null +++ b/packages/markdoc/CHANGELOG.md @@ -0,0 +1,9 @@ +# @astrojs/starlight-markdoc + +## 0.1.0 + +### Minor Changes + +- [#2249](https://github.com/withastro/starlight/pull/2249) [`20cbf3b`](https://github.com/withastro/starlight/commit/20cbf3b6a4d1598a62fdb176ebaa849bc7b978f7) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Adds Starlight Markdoc preset. + + See the [“Markdoc”](https://starlight.astro.build/guides/authoring-content/#markdoc) guide to learn more on how to use this preset in a new or existing project. diff --git a/packages/markdoc/Code.astro b/packages/markdoc/Code.astro new file mode 100644 index 0000000000..8c8a0609fb --- /dev/null +++ b/packages/markdoc/Code.astro @@ -0,0 +1,16 @@ +--- +import { Code as Default } from '@astrojs/starlight/components'; + +interface Props { + code: string; + lang?: string; +} + +/** + * This component is a basic wrapper for the `` component from Starlight used for Markdoc + * fenced code blocks that ensures that we do not pass any child content to the `` component + * which is an usage not supported by Expressive Code and would throw an error. + */ +--- + + diff --git a/packages/markdoc/README.md b/packages/markdoc/README.md new file mode 100644 index 0000000000..8141a004f0 --- /dev/null +++ b/packages/markdoc/README.md @@ -0,0 +1,18 @@ +# @astrojs/starlight-markdoc + +Markdoc preset for the [Starlight][starlight] documentation theme for [Astro][astro]. + +## Documentation + +See the [Starlight Markdoc docs][docs] for how to use this preset. + +## License + +MIT + +Copyright (c) 2024–present [Starlight contributors][contributors] + +[starlight]: https://starlight.astro.build/ +[astro]: https://astro.build/ +[docs]: https://starlight.astro.build/guides/authoring-content/#markdoc +[contributors]: https://github.com/withastro/starlight/graphs/contributors diff --git a/packages/markdoc/__tests__/markdoc.test-d.ts b/packages/markdoc/__tests__/markdoc.test-d.ts new file mode 100644 index 0000000000..868f2c970e --- /dev/null +++ b/packages/markdoc/__tests__/markdoc.test-d.ts @@ -0,0 +1,127 @@ +import type { ComponentProps, HTMLAttributes } from 'astro/types'; +import { expectTypeOf, test } from 'vitest'; + +import { + Aside, + Badge, + Card, + CardGrid, + Code, + FileTree, + Icon, + LinkButton, + LinkCard, + Steps, + TabItem, + Tabs, +} from '@astrojs/starlight/components'; + +type UserComponents = keyof typeof import('@astrojs/starlight/components'); +type UserComponentProps any> = keyof RemoveIndexSignature< + ComponentProps +>; + +type MarkdocPreset = typeof import('../index.mjs').StarlightMarkdocPreset; +type MarkdocTags = keyof MarkdocPreset['tags']; +type MarkdocTagAttributes = keyof MarkdocPreset['tags'][T]['attributes']; + +test('defines a tag for each user components', () => { + expectTypeOf().toEqualTypeOf>(); +}); + +test('defines all `