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] Fix duplicated Algolia records #419

Merged

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Oct 10, 2020

The pages are accessible through two different URLs:

This creates a duplicated record in Algolia's index when crawling our documentation.

Capture d’écran 2020-10-10 à 12 44 09

To solve the problem, I'm creating a next branch and a version of the source using v5, this will set https://github.com/mui-org/material-ui/blob/5af951be84e625eff6080b91ff5d6be28da4230b/docs/src/modules/components/Head.js#L33 which allows to disambiguate.

Then, all we need to do is have https://next.material-ui.com/ proxy https://next--material-ui-x.netlify.app/ instead of master. Done in mui/material-ui@bb0886a.

@oliviertassinari oliviertassinari added the docs Improvements or additions to the documentation label Oct 10, 2020
@oliviertassinari oliviertassinari force-pushed the fix-algolia-duplicate-records branch 2 times, most recently from 475073a to 96834b8 Compare October 11, 2020 15:35
@oliviertassinari oliviertassinari force-pushed the fix-algolia-duplicate-records branch from 96834b8 to 7955842 Compare October 11, 2020 17:23
@oliviertassinari oliviertassinari added the bug 🐛 Something doesn't work label Oct 11, 2020
@oliviertassinari
Copy link
Member Author

I can confirm the solution works. https://deploy-preview-419--material-ui-x.netlify.app/ outputs:

<meta name="docsearch:version" content="next"/>

@oliviertassinari oliviertassinari merged commit 50a16a1 into mui:next Oct 12, 2020
@oliviertassinari oliviertassinari deleted the fix-algolia-duplicate-records branch October 12, 2020 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant