Skip to content

Commit 3e440d3

Browse files
vladmorozatomiks
authored andcommitted
[docs] Remove trailing slash from the URLs (mui#748)
1 parent f2390f4 commit 3e440d3

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

docs/data/components/alert-dialog/alert-dialog.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Alert Dialogs are implemented using a collection of related components:
4747

4848
## Alert dialogs vs. dialogs
4949

50-
The Alert Dialog is in many ways similar to the [Dialog](/components/react-dialog/) component.
50+
The Alert Dialog is in many ways similar to the [Dialog](/components/react-dialog) component.
5151
Alert dialogs should be used in cases where the normal user's workflow needs to be interrupted to get a response.
5252
Therefore alert dialogs are always modal and cannot be dismissed any other way than by pressing a button inside them.
5353

docs/data/components/menu/menu.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ To visually separate items, use the `Menu.Separator` component:
277277
```
278278

279279
The Menu.Separator is a re-exported Separator component.
280-
See the [Separator docs](/components/react-separator/) to learn about its API.
280+
See the [Separator docs](/components/react-separator) to learn about its API.
281281

282282
## Animations
283283

docs/data/getting-started/quick-start/quick-start.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: Get started with Base UI, a library of headless ("unstyled") React
99

1010
<Callout type="info">
1111
If you're using Next.js 13.4 or later, check out the [Next.js App Router
12-
guide](/guides/next-js-app-router/).
12+
guide](/guides/next-js-app-router).
1313
</Callout>
1414

1515
## Installation

docs/next.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const rootPackage = loadPackageJson();
2020

2121
/** @type {import('next').NextConfig} */
2222
const nextConfig = {
23+
trailingSlash: false,
2324
env: {
2425
// docs-infra
2526
LIB_VERSION: rootPackage.version,

docs/scripts/reportBrokenLinks.mts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ async function processMarkdownPage(filePath: string) {
7979
}
8080
}
8181

82-
function pagePathToUrl(pagePath: string): string | null {
82+
function pagePathToUrl(pagePath: string, trailingSlash = false): string | null {
8383
// data/($1)/($2)/*.mdx
8484
const parts = /^data\/([^/]*)\/([^/]*)\/[^/]*.mdx?$/.exec(pagePath);
8585

@@ -88,10 +88,10 @@ function pagePathToUrl(pagePath: string): string | null {
8888
}
8989

9090
if (parts[1] === 'components') {
91-
return `/components/react-${parts[2]}/`;
91+
return `/components/react-${parts[2]}${trailingSlash ? '/' : ''}`;
9292
}
9393

94-
return `/${parts[1]}/${parts[2]}/`;
94+
return `/${parts[1]}/${parts[2]}${trailingSlash ? '/' : ''}`;
9595
}
9696

9797
async function getLinksAndAnchors(

0 commit comments

Comments
 (0)