Skip to content
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-infra] Catch duplicated trailing splashes in links #38758

Merged

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Sep 2, 2023

A succession of problems led to me breaking master (a71e6a0 broke the CI on master).

  1. yarn docs:link-check outputted /joy-ui/integrations/material-ui/ in material-ui/docs/.link-check-errors.txt, it should have been /joy-ui/integrations/material-ui//. In [docs][joy-ui] Change the customization and how-to guides docs tree #38396 it would have made it clearer that we were introducing double trailing slashes. The root problem IMHO is that when we compare URLs we should compare their final version. So in this PR, I make sure we compare the URL with trailing slashes.
  2. In [docs][joy-ui] Change the customization and how-to guides docs tree #38396 we shouldn't have been able to get the CI pass with [docs][joy-ui] Change the customization and how-to guides docs tree #38396 (comment). I'm introducing a new error. https://help.ahrefs.com/en/articles/2596665-double-slash-in-url-error-in-site-audit

A side win, because these URL checks add to the runtime and bundle size, I'm now excluding them from production with process.env.DEPLOY_ENV !== 'production'. One step toward making the fastest UI component library documentation 🚀

@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work scope: docs-infra Specific to the docs-infra product labels Sep 2, 2023
@mui-bot
Copy link

mui-bot commented Sep 2, 2023

Netlify deploy preview

https://deploy-preview-38758--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 79dba61

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Sep 6, 2023
@oliviertassinari oliviertassinari force-pushed the docs-infra-detect-multi-slashes branch from 73260bc to fd88c6d Compare September 10, 2023 12:14
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Sep 10, 2023
@oliviertassinari oliviertassinari merged commit 9a715e0 into mui:master Sep 10, 2023
@oliviertassinari oliviertassinari deleted the docs-infra-detect-multi-slashes branch September 10, 2023 13:21
xcode-it pushed a commit to xcode-it/material-ui that referenced this pull request Sep 11, 2023
@alexfauquette
Copy link
Member

Nice to see this CI check evolving with time :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work scope: docs-infra Specific to the docs-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants