diff --git a/.changeset/fresh-ads-sneeze.md b/.changeset/fresh-ads-sneeze.md new file mode 100644 index 00000000000..314eafcc90b --- /dev/null +++ b/.changeset/fresh-ads-sneeze.md @@ -0,0 +1,7 @@ +--- +'@astrojs/starlight': minor +--- + +Removes the `tagline` configuration option, which was never used. + +If your configuration included a `tagline` option, you can safely remove it without any replacement. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e30e3507e41..0a27a480536 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,6 +35,9 @@ jobs: - name: Install Dependencies run: pnpm i + - name: Build Packages + run: pnpm run build + - name: Create Release Pull Request uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0 with: diff --git a/.prettierignore b/.prettierignore index f587de0c8ec..c3ae18ecf96 100644 --- a/.prettierignore +++ b/.prettierignore @@ -17,10 +17,10 @@ pnpm-lock.yaml **/__tests__/**/snapshots # https://github.com/withastro/prettier-plugin-astro/issues/337 -packages/starlight/user-components/Tabs.astro +packages/starlight/src/user-components/Tabs.astro # Prettier forces whitespace between elements we want to avoid for consistency with the rehype version -packages/starlight/components/AnchorHeading.astro +packages/starlight/src/components/AnchorHeading.astro packages/starlight/__e2e__/fixtures/basics/src/content/docs/anchor-heading-component.mdx # Malformed YAML file used for testing diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 803ec8a5494..8f67f6e03d2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -228,7 +228,7 @@ Check out the dedicated [i18n contribution guidelines](https://contribute.docs.a Starlight’s UI comes with some built-in text elements. For example, the table of contents on a Starlight page has a heading of “On this page” and the theme picker shows “Light”, “Dark”, and “Auto” labels. Starlight aims to provide these in as many languages as possible. -Help out by adding or updating translation files in [`packages/starlight/translations`](./packages/starlight/translations/). +Help out by adding or updating translation files in [`packages/starlight/src/translations`](./packages/starlight/src/translations/). Each language’s JSON file follows the [translation structure described in Starlight’s docs](https://starlight.astro.build/guides/i18n/#translate-starlights-ui). 📺 **Prefer a visual walkthrough?** [Watch an introduction to Starlight’s translation files.](https://scrimba.com/scrim/cpb44bt3) @@ -262,14 +262,14 @@ To add a language, you will need its BCP-47 tag and a label. See [“Adding a ne - Starlight is built as an Astro integration. Read the [Astro Integration API docs][api-docs] to learn more about how integrations work. - The Starlight integration is exported from [`packages/starlight/index.ts`](./packages/starlight/index.ts). + The Starlight integration is exported from [`packages/starlight/src/index.ts`](./packages/starlight/src/index.ts). It sets up Starlight’s routing logic, parses user config, and adds configuration to a Starlight user’s Astro project. -- Most pages in a Starlight project are built using a single [`packages/starlight/index.astro`](./packages/starlight/index.astro) route. +- Most pages in a Starlight project are built using a single [`packages/starlight/src/routes/common.astro`](./packages/starlight/src/routes/common.astro) route. If you’ve worked on an Astro site before, much of this should look familiar: it’s an Astro component and uses a number of other components to build a page based on user content. - Starlight consumes a user’s content from the `'docs'` [content collection](https://docs.astro.build/en/guides/content-collections/). - This allows us to specify the permissible frontmatter via [a Starlight-specific schema](./packages/starlight/schema.ts) and get predictable data while providing clear error messages if a user sets invalid frontmatter in a page. + This allows us to specify the permissible frontmatter via [a Starlight-specific schema](./packages/starlight/src/schema.ts) and get predictable data while providing clear error messages if a user sets invalid frontmatter in a page. - Components that require JavaScript for their functionality are all written without a UI framework, most often as custom elements. This helps keep Starlight lightweight and makes it easier for a user to choose to add components from a framework of their choice to their project. diff --git a/docs/package.json b/docs/package.json index c400b48f4f1..4f88c9d9584 100644 --- a/docs/package.json +++ b/docs/package.json @@ -9,7 +9,6 @@ "start": "astro dev", "build": "astro build", "preview": "astro preview", - "typecheck": "tsc --noEmit", "linkcheck": "CHECK_LINKS=true pnpm build", "astro": "astro", "lunaria:build": "lunaria build", diff --git a/docs/src/components/icons-list.astro b/docs/src/components/icons-list.astro index 1ae9ca5074a..b1db41594fd 100644 --- a/docs/src/components/icons-list.astro +++ b/docs/src/components/icons-list.astro @@ -1,6 +1,6 @@ --- import { Icon } from '@astrojs/starlight/components'; -import { Icons, type StarlightIcon } from '../../../packages/starlight/components-internals/Icons'; +import { Icons, type StarlightIcon } from '../../../packages/starlight/src/components-internals/Icons'; interface Props { labels?: { diff --git a/docs/src/components/languages-list.astro b/docs/src/components/languages-list.astro index 03a0b40dd70..b7acb8de304 100644 --- a/docs/src/components/languages-list.astro +++ b/docs/src/components/languages-list.astro @@ -1,6 +1,6 @@ --- import { getEntry } from 'astro:content'; -import translations from '../../../packages/starlight/translations'; +import translations from '../../../packages/starlight/src/translations'; interface Props { startsSentence?: boolean; diff --git a/docs/src/components/sidebar-preview.astro b/docs/src/components/sidebar-preview.astro index 2ecdd9d32d5..c358edb4773 100644 --- a/docs/src/components/sidebar-preview.astro +++ b/docs/src/components/sidebar-preview.astro @@ -3,10 +3,10 @@ import type { AutoSidebarGroup, SidebarItem, InternalSidebarLinkItem, -} from '../../../packages/starlight/schemas/sidebar'; -import SidebarSublist from '../../../packages/starlight/components/SidebarSublist.astro'; -import type { Badge } from '../../../packages/starlight/schemas/badge'; -import type { SidebarEntry } from '../../../packages/starlight/utils/routing/types'; +} from '../../../packages/starlight/src/schemas/sidebar'; +import SidebarSublist from '../../../packages/starlight/src/components/SidebarSublist.astro'; +import type { Badge } from '../../../packages/starlight/src/schemas/badge'; +import type { SidebarEntry } from '../../../packages/starlight/src/utils/routing/types'; interface Props { config: SidebarConfig; diff --git a/docs/src/components/ui-strings-list.astro b/docs/src/components/ui-strings-list.astro index 4684be73d64..85584b7c45c 100644 --- a/docs/src/components/ui-strings-list.astro +++ b/docs/src/components/ui-strings-list.astro @@ -1,6 +1,6 @@ --- import { Code } from '@astrojs/starlight/components'; -import uiStrings from '../../../packages/starlight/translations/en.json?raw'; +import uiStrings from '../../../packages/starlight/src/translations/en.json?raw'; --- diff --git a/docs/src/content/docs/components/asides.mdx b/docs/src/content/docs/components/asides.mdx index 329f3170958..0effbc84196 100644 --- a/docs/src/content/docs/components/asides.mdx +++ b/docs/src/content/docs/components/asides.mdx @@ -164,7 +164,7 @@ A tip aside *with* a custom icon. ## `