Skip to content

Commit

Permalink
fix: update wrong links (#2524)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
  • Loading branch information
jsparkdev and delucis authored Oct 29, 2024
1 parent 4320c48 commit 1b46783
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/sour-forks-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/starlight': patch
---

Fixes a broken link to Astro’s Docs in an error message
2 changes: 1 addition & 1 deletion docs/src/content/docs/guides/i18n.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ See the [`dir()` reference in the i18next documentation](https://www.i18next.com

You can use [`Astro.currentLocale`](https://docs.astro.build/en/reference/api-reference/#astrocurrentlocale) to read the current locale in `.astro` components.

The following example reads the current locale and uses it with the [`getRelativeLocaleUrl()`](https://docs.astro.build/en/reference/api-reference/#getrelativelocaleurl) helper to generate a link to an about page in the current language:
The following example reads the current locale and uses it with the [`getRelativeLocaleUrl()`](https://docs.astro.build/en/reference/modules/astro-i18n/#getrelativelocaleurl) helper to generate a link to an about page in the current language:

```astro
---
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/reference/overrides.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ entry: {
}
```

Learn more about the shape of this object in [Astro’s Collection Entry Type](https://docs.astro.build/en/reference/api-reference/#collection-entry-type) reference.
Learn more about the shape of this object in [Astro’s Collection Entry Type](https://docs.astro.build/en/reference/modules/astro-content/#collectionentry) reference.

#### `sidebar`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('getSidebar', () => {
The slug \`"getting-started"\` specified in the Starlight sidebar config does not exist.
Hint:
Update the Starlight config to reference a valid entry slug in the docs content collection.
Learn more about Astro content collection slugs at https://docs.astro.build/en/reference/api-reference/#getentry"
Learn more about Astro content collection slugs at https://docs.astro.build/en/reference/modules/astro-content/#getentry"
`);
});
});
2 changes: 1 addition & 1 deletion packages/starlight/utils/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function linkFromInternalSidebarLinkItem(
throw new AstroError(
`The slug \`"${item.slug}"\` specified in the Starlight sidebar config does not exist.`,
'Update the Starlight config to reference a valid entry slug in the docs content collection.\n' +
'Learn more about Astro content collection slugs at https://docs.astro.build/en/reference/api-reference/#getentry'
'Learn more about Astro content collection slugs at https://docs.astro.build/en/reference/modules/astro-content/#getentry'
);
}
}
Expand Down

0 comments on commit 1b46783

Please sign in to comment.