-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Fix 404 links #36969
[docs] Fix 404 links #36969
Conversation
Netlify deploy preview
Bundle size report |
@@ -4,7 +4,7 @@ import createStack from './createStack'; | |||
* | |||
* Demos: | |||
* | |||
* - [Stack (Joy UI)](https://mui.com/joy/react-stack/) | |||
* - [Stack (Joy UI)](https://mui.com/joy-ui/react-stack/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
404
* TODO: this should really be fixed in findPagesMarkdown(). | ||
* Plus replaceComponentLinks() shouldn't exist in the first place, | ||
* the markdown folder location should match the URLs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic that converts docs markdown file location to URL location is a mess right now. One step toward making it straightforward.
@@ -211,8 +211,7 @@ async function run(argv: yargs.ArgumentsCamelCase<CommandOptions>) { | |||
// Box's demo isn't ready | |||
// Container's demo isn't ready | |||
// Grid has problem with react-docgen | |||
// Stack has problem with react-docgen | |||
component.filename.match(/(Box|Container|ColorInversion|Grid|Stack)/)) || | |||
component.filename.match(/(Box|Container|ColorInversion|Grid)/)) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed the Stack generation in #36785 but forgot to enable its page generation. It's why it's a 404: https://mui.com/joy-ui/api/stack/.
const replaceStylesLinks = (markdown: string) => { | ||
return markdown.replace(/\(\/styles\/([^)]*)\)/gm, '(/system/styles/$1)'); | ||
}; | ||
|
||
export default function replaceMarkdownLinks(markdown: string) { | ||
return replaceStylesLinks(replaceMaterialLinks(replaceAPILinks(replaceComponentLinks(markdown)))); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dead code, only used in the tests.
@@ -5,7 +5,7 @@ export default function DivButton() { | |||
return ( | |||
<Button | |||
component="a" | |||
href="https://mui.com/about-us/" | |||
href="https://mui.com/about/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue from #34990. 404 link
/api/no-ssr/ /base/api/no-ssr/ 301 | ||
/pt/api/no-ssr/ /pt/base/api/no-ssr/ 301 | ||
/zh/api/no-ssr/ /zh/base/api/no-ssr/ 301 | ||
/api/no-ssr/ /base/react-no-ssr/components-api/#no-ssr 301 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More double redirection from #36833.
Fix issues reported in https://app.ahrefs.com/site-audit/3524616/61/issues.
However, there are still some left, regressions from #35938, e.g.