Skip to content

Commit 9cf9de6

Browse files
[docs] Basic link verification at PR level (#34588)
1 parent 224e38c commit 9cf9de6

File tree

12 files changed

+237
-8
lines changed

12 files changed

+237
-8
lines changed

.circleci/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,11 @@ jobs:
240240
command: |
241241
yarn extract-error-codes
242242
git diff --exit-code
243+
- run:
244+
name: '`yarn docs:link-check` changes committed?'
245+
command: |
246+
yarn docs:link-check
247+
git diff --exit-code
243248
test_types:
244249
<<: *defaults
245250
resource_class: 'medium+'

docs/.link-check-errors.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Broken links found by `yarn docs:link-check` that exist:
2+
3+
- https://mui.com/blog/material-ui-v4-is-out/#premium-themes-store-✨
4+
- https://mui.com/size-snapshot

docs/data/material/experimental-api/css-theme-variables/customization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ Or use `var()` to refer to the CSS variable directly:
180180
```
181181

182182
:::info
183-
💡 If you're using a [custom prefix](/material-ui/experimental-api/css-theme-variables/customization/#changing-variable-prefix), make sure to replace the default `--mui`.
183+
💡 If you're using a [custom prefix](/material-ui/experimental-api/css-theme-variables/customization/#changing-variable-prefixes), make sure to replace the default `--mui`.
184184
:::
185185

186186
### TypeScript

docs/data/material/experimental-api/css-theme-variables/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ function App() {
111111
```
112112

113113
:::info
114-
💡 If you have set up a [custom prefix](/material-ui/experimental-api/css-theme-variables/customization/#changing-variable-prefix), make sure to replace the default `--mui`.
114+
💡 If you have set up a [custom prefix](/material-ui/experimental-api/css-theme-variables/customization/#changing-variable-prefixes), make sure to replace the default `--mui`.
115115
:::
116116

117117
## Server-side rendering

docs/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"start": "next start",
1616
"typescript": "tsc -p tsconfig.json && tsc -p scripts/tsconfig.json",
1717
"typescript:transpile": "echo 'Use `yarn docs:typescript:formatted'` instead && exit 1",
18-
"typescript:transpile:dev": "echo 'Use `yarn docs:typescript'` instead && exit 1"
18+
"typescript:transpile:dev": "echo 'Use `yarn docs:typescript'` instead && exit 1",
19+
"link-check": "node ./scripts/reportBrokenLinks.js"
1920
},
2021
"dependencies": {
2122
"@babel/core": "^7.19.3",

docs/pages/blog/2020-q3-update.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Here are the most significant improvements since June 2020. This was a dense qua
1919
- 🧪 We have promoted 7 components from the lab to the core: Alert, Autocomplete, Pagination, Rating, Skeleton, SpeedDial, and ToggleButton.
2020
Thank you for all your feedback on these components.
2121
While we still plan a couple of breaking changes on them, we are confident that they have reached the same level of quality as the other core components.
22-
- 👮 We have introduced a new component in the lab, the [TrapFocus](https://mui.com/base/react-trap-focus/). It manages focus for its descendants. This is useful when implementing overlays such as modal dialogs, which should not allow the focus to escape while open:
22+
- 👮 We have introduced a new component in the lab, the [TrapFocus](https://mui.com/base/react-focus-trap/). It manages focus for its descendants. This is useful when implementing overlays such as modal dialogs, which should not allow the focus to escape while open:
2323

2424
<video style="max-height: 416px; margin-bottom: 24px;" autoplay muted loop playsinline>
2525
<source src="/static/blog/2020-q3-update/trap-focus.mp4" type="video/mp4" />

docs/pages/blog/2020.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ We have achieved most of what we could have hoped for.
4848
- [DatePicker](https://v4.mui.com/components/pickers/)
4949
- [LoadingButton](https://mui.com/material-ui/react-button/#loading-button)
5050
- [Timeline](https://v4.mui.com/components/timeline/)
51-
- [TrapFocus](https://mui.com/base/react-trap-focus/)
51+
- [TrapFocus](https://mui.com/base/react-focus-trap/)
5252
- We have fixed most of the issues with the [Autocomplete](https://v4.mui.com/components/autocomplete/). We have received an overwhelming interest in the component. It was impressive to see.
5353
- We have completed the work for [strict mode](https://reactjs.org/docs/strict-mode.html) support.
5454
- We have increased the adoption of TypeScript in the codebase. We don't plan a dedicated migration but to write new code in TypeScript, as we go.

docs/pages/blog/2021-q3-update.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Here are the most significant improvements since early July 2021.
8888
import Portal from '@mui/base/Portal';
8989
```
9090

91-
- [TrapFocus](/base/react-trap-focus/)
91+
- [TrapFocus](/base/react-focus-trap/)
9292

9393
```jsx
9494
import TrapFocus from '@mui/base/TrapFocus';

docs/pages/blog/2021.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ We have achieved most of what we could have hoped for.
7777

7878
- [Masonry](/material-ui/react-masonry/)
7979
- [Stack](/material-ui/react-stack/)
80-
- [Trap Focus](/base/react-trap-focus/)
80+
- [Trap Focus](/base/react-focus-trap/)
8181
- [Unstyled Button](/base/react-button/)
8282
- [Unstyled Slider](/base/react-slider/)
8383
- [Unstyled Modal](/base/react-modal/)

docs/pages/blog/mui-core-v5.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ Having a separate lab package allows us to release breaking changes when necessa
593593

594594
The following components are now available in the lab:
595595

596-
- [LoadingButton](/material-ui/react-button/#loading-buttons). It does what you would expect. It renders the `Button` with a configurable loading/pending state.
596+
- [LoadingButton](/material-ui/react-button/#loading-button). It does what you would expect. It renders the `Button` with a configurable loading/pending state.
597597
- [FocusTrap](/base/react-focus-trap/). This component traps the keyboard focus within a DOM node. For example, it's used by the Modal to prevent tabbing out of the component for accessibility reasons.
598598
- [Masonry](/material-ui/react-masonry/). One great use case for this component is when using the `Grid` component leads to wasted space. It's frequently used in dashboards.
599599

0 commit comments

Comments
 (0)