Skip to content

Commit d9d415b

Browse files
delucisHiDeoo
andauthored
Fix outdated links to Expressive Code documentation (#2782)
Co-authored-by: HiDeoo <494699+HiDeoo@users.noreply.github.com>
1 parent 23bf960 commit d9d415b

File tree

5 files changed

+20
-15
lines changed

5 files changed

+20
-15
lines changed

.changeset/tender-tools-kick.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@astrojs/starlight': patch
3+
---
4+
5+
Fixes a documentation link in the JSDoc comment for the `StarlightExpressiveCodeOptions` type

docs/src/content/docs/guides/authoring-content.mdx

+10-10
Original file line numberDiff line numberDiff line change
@@ -220,24 +220,24 @@ var fun = function lang(l) {
220220

221221
### Expressive Code features
222222

223-
Starlight uses [Expressive Code](https://github.com/expressive-code/expressive-code/tree/main/packages/astro-expressive-code) to extend formatting possibilities for code blocks.
223+
Starlight uses [Expressive Code](https://expressive-code.com/) to extend formatting possibilities for code blocks.
224224
Expressive Code’s text markers and window frames plugins are enabled by default.
225225
Code block rendering can be configured using Starlight’s [`expressiveCode` configuration option](/reference/configuration/#expressivecode).
226226

227227
#### Text markers
228228

229-
You can highlight specific lines or parts of your code blocks using [Expressive Code text markers](https://github.com/expressive-code/expressive-code/blob/main/packages/%40expressive-code/plugin-text-markers/README.md#usage-in-markdown--mdx-documents) on the opening line of your code block.
229+
You can highlight specific lines or parts of your code blocks using [Expressive Code text markers](https://expressive-code.com/key-features/text-markers/) on the opening line of your code block.
230230
Use curly braces (`{ }`) to highlight entire lines, and quotation marks to highlight strings of text.
231231

232232
There are three highlighting styles: neutral for calling attention to code, green for indicating inserted code, and red for indicating deleted code.
233233
Both text and entire lines can be marked using the default marker, or in combination with `ins=` and `del=` to produce the desired highlighting.
234234

235235
Expressive Code provides several options for customizing the visual appearance of your code samples.
236236
Many of these can be combined, for highly illustrative code samples.
237-
Please explore the [Expressive Code documentation](https://github.com/expressive-code/expressive-code/blob/main/packages/%40expressive-code/plugin-text-markers/README.md) for the extensive options available.
237+
Please explore the [Expressive Code documentation](https://expressive-code.com/key-features/text-markers/#configuration) for the extensive options available.
238238
Some of the most common examples are shown below:
239239

240-
- [Mark entire lines & line ranges using the `{ }` marker](https://github.com/expressive-code/expressive-code/blob/main/packages/%40expressive-code/plugin-text-markers/README.md#marking-entire-lines--line-ranges):
240+
- [Mark entire lines & line ranges using the `{ }` marker](https://expressive-code.com/key-features/text-markers/#marking-full-lines--line-ranges):
241241

242242
```js {2-3}
243243
function demo() {
@@ -255,7 +255,7 @@ Some of the most common examples are shown below:
255255
```
256256
````
257257

258-
- [Mark selections of text using the `" "` marker or regular expressions](https://github.com/expressive-code/expressive-code/blob/main/packages/%40expressive-code/plugin-text-markers/README.md#marking-individual-text-inside-lines):
258+
- [Mark selections of text using the `" "` marker or regular expressions](https://expressive-code.com/key-features/text-markers/#marking-individual-text-inside-lines):
259259

260260
```js "Individual terms" /Even.*supported/
261261
// Individual terms can be highlighted, too
@@ -273,7 +273,7 @@ Some of the most common examples are shown below:
273273
```
274274
````
275275

276-
- [Mark text or lines as inserted or deleted with `ins` or `del`](https://github.com/expressive-code/expressive-code/blob/main/packages/%40expressive-code/plugin-text-markers/README.md#selecting-marker-types-mark-ins-del):
276+
- [Mark text or lines as inserted or deleted with `ins` or `del`](https://expressive-code.com/key-features/text-markers/#selecting-inline-marker-types-mark-ins-del):
277277

278278
```js "return true;" ins="inserted" del="deleted"
279279
function demo() {
@@ -293,7 +293,7 @@ Some of the most common examples are shown below:
293293
```
294294
````
295295

296-
- [Combine syntax highlighting with `diff`-like syntax](https://github.com/expressive-code/expressive-code/blob/main/packages/%40expressive-code/plugin-text-markers/README.md#combining-syntax-highlighting-with-diff-like-syntax):
296+
- [Combine syntax highlighting with `diff`-like syntax](https://expressive-code.com/key-features/text-markers/#combining-syntax-highlighting-with-diff-like-syntax):
297297

298298
```diff lang="js"
299299
function thisIsJavaScript() {
@@ -323,7 +323,7 @@ Other languages display inside a code editor-style frame if they include a title
323323

324324
A code block’s optional title can be set either with a `title="..."` attribute following the code block's opening backticks and language identifier, or with a file name comment in the first lines of the code.
325325

326-
- [Add a file name tab with a comment](https://github.com/expressive-code/expressive-code/blob/main/packages/%40expressive-code/plugin-frames/README.md#adding-titles-open-file-tab-or-terminal-window-title)
326+
- [Add a file name tab with a comment](https://expressive-code.com/key-features/frames/#code-editor-frames)
327327

328328
```js
329329
// my-test-file.js
@@ -337,7 +337,7 @@ A code block’s optional title can be set either with a `title="..."` attribute
337337
```
338338
````
339339

340-
- [Add a title to a Terminal window](https://github.com/expressive-code/expressive-code/blob/main/packages/%40expressive-code/plugin-frames/README.md#adding-titles-open-file-tab-or-terminal-window-title)
340+
- [Add a title to a Terminal window](https://expressive-code.com/key-features/frames/#terminal-frames)
341341

342342
```bash title="Installing dependencies…"
343343
npm install
@@ -349,7 +349,7 @@ A code block’s optional title can be set either with a `title="..."` attribute
349349
```
350350
````
351351

352-
- [Disable window frames with `frame="none"`](https://github.com/expressive-code/expressive-code/blob/main/packages/%40expressive-code/plugin-frames/README.md#overriding-frame-types)
352+
- [Disable window frames with `frame="none"`](https://expressive-code.com/key-features/frames/#overriding-frame-types)
353353

354354
```bash frame="none"
355355
echo "This is not rendered as a terminal despite using the bash language"

docs/src/content/docs/guides/i18n.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ You can provide translations for additional languages you support — or overrid
221221

222222
<UIStringsList />
223223

224-
Starlight’s code blocks are powered by the [Expressive Code](https://github.com/expressive-code/expressive-code) library.
224+
Starlight’s code blocks are powered by the [Expressive Code](https://expressive-code.com/) library.
225225
You can set translations for its UI strings in the same JSON file using `expressiveCode` keys:
226226

227227
```json

docs/src/content/docs/reference/configuration.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -384,10 +384,10 @@ starlight({
384384
**type:** `StarlightExpressiveCodeOptions | boolean`
385385
**default:** `true`
386386

387-
Starlight uses [Expressive Code](https://github.com/expressive-code/expressive-code/tree/main/packages/astro-expressive-code) to render code blocks and add support for highlighting parts of code examples, adding filenames to code blocks, and more.
387+
Starlight uses [Expressive Code](https://expressive-code.com) to render code blocks and add support for highlighting parts of code examples, adding filenames to code blocks, and more.
388388
See the [“Code blocks” guide](/guides/authoring-content/#code-blocks) to learn how to use Expressive Code syntax in your Markdown and MDX content.
389389

390-
You can use any of the standard [Expressive Code configuration options](https://github.com/expressive-code/expressive-code/blob/main/packages/astro-expressive-code/README.md#configuration) as well as some Starlight-specific properties, by setting them in Starlight’s `expressiveCode` option.
390+
You can use any of the standard [Expressive Code configuration options](https://expressive-code.com/reference/configuration/) as well as some Starlight-specific properties, by setting them in Starlight’s `expressiveCode` option.
391391
For example, set Expressive Code’s `styleOverrides` option to override the default CSS. This enables customizations like giving your code blocks rounded corners:
392392

393393
```js ins={2-4}
@@ -414,7 +414,7 @@ In addition to the standard Expressive Code options, you can also set the follow
414414
**default:** `['starlight-dark', 'starlight-light']`
415415

416416
Set the themes used to style code blocks.
417-
See the [Expressive Code `themes` documentation](https://github.com/expressive-code/expressive-code/blob/main/packages/astro-expressive-code/README.md#themes) for details of the supported theme formats.
417+
See the [Expressive Code `themes` documentation](https://expressive-code.com/guides/themes/) for details of the supported theme formats.
418418

419419
Starlight uses the dark and light variants of Sarah Drasner’s [Night Owl theme](https://github.com/sdras/night-owl-vscode-theme) by default.
420420

packages/starlight/integrations/expressive-code/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export type StarlightExpressiveCodeOptions = Omit<AstroExpressiveCodeOptions, 't
2020
/**
2121
* Set the themes used to style code blocks.
2222
*
23-
* See the [Expressive Code `themes` documentation](https://github.com/expressive-code/expressive-code/blob/main/packages/astro-expressive-code/README.md#themes)
23+
* See the [Expressive Code `themes` documentation](https://expressive-code.com/guides/themes/)
2424
* for details of the supported theme formats.
2525
*
2626
* Starlight uses the dark and light variants of Sarah Drasner’s

0 commit comments

Comments
 (0)