Skip to content

Commit b79be60

Browse files
committed
docs: expand exclude documentation
1 parent 1d04d00 commit b79be60

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

docs/src/content/docs/configuration.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,15 +187,25 @@ For more advanced use cases, a function can also be provided to dynamically dete
187187

188188
This option should be used with caution but can be useful to exclude links that are not meant to be validated like redirects only existing in production or links to [custom pages](https://starlight.astro.build/guides/pages/#custom-pages) that are automatically generated or not part of your documentation.
189189

190-
The following example uses glob patterns to exclude links to the `/social/twitter` page and all links to any pages in the `/api/interface/` and `/api/functions/` directories:
190+
The following example uses glob patterns to exclude links to the `/social/twitter` page, all links to any pages in the `/api/interface/` and `/api/functions/` directories, and all links to the `/changelog` page, no matter if a trailing slash is used or not, and also all links to any pages in the `/changelog/` directory:
191191

192-
```js {6}
192+
```js {6-16}
193193
export default defineConfig({
194194
integrations: [
195195
starlight({
196196
plugins: [
197197
starlightLinksValidator({
198-
exclude: ['/social/twitter', '/api/{interface,functions}/**/*'],
198+
exclude: [
199+
// Exclude links to the `/social/twitter` page.
200+
'/social/twitter',
201+
// Exclude all links to any pages in the `/api/interface/`
202+
// and `/api/functions/` directories.
203+
'/api/{interface,functions}/**/*',
204+
// Exclude all links to the `/changelog` page, no matter if a
205+
// trailing slash is used or not, and also exclude all links to
206+
// any pages in the `/changelog/` directory.
207+
'/changelog{,/**/*}',
208+
],
199209
}),
200210
],
201211
}),

0 commit comments

Comments
 (0)