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] Rename the /api/ folder #16752

Closed

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Jul 25, 2019

The problem

Next.js v9 introduces the concepts of API pages: https://nextjs.org/blog/next-9#api-routes. The implication is that we can no longer use this /api/ subfolder name to host our components API. You can see the implication in https://master--material-ui.netlify.com/api/app-bar/: the client-side bundle is missing. While it partially works today, it might not work at all tomorrow; It seems that the server-side part works by luck, the Next.js team didn't design it 🍀.

The solution

I have considered 3 options:

  1. We rename the /api/x routes. These pages have low SEO value for us. We will have to handle the 301 logic.
  2. We kill the /api pages, we move that data back to the main component pages.
  3. We add an option in Next.js, to add the support back in v9.

After talking with Tim, he would like to avoid option n°3. Option n°2 shouldn't be motivated first by such constraint, so I went with option n°1.

@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work docs Improvements or additions to the documentation labels Jul 25, 2019
@mui-pr-bot
Copy link

Details of bundle changes.

Comparing: d4c7c05...55a3a79

bundle parsed diff gzip diff prev parsed current parsed prev gzip current gzip
@material-ui/core 0.00% 0.00% 327,279 327,279 90,300 90,300
@material-ui/core/Paper 0.00% 0.00% 68,218 68,218 20,410 20,410
@material-ui/core/Paper.esm 0.00% 0.00% 61,994 61,994 19,220 19,220
@material-ui/core/Popper 0.00% 0.00% 28,963 28,963 10,428 10,428
@material-ui/core/Textarea 0.00% 0.00% 5,541 5,541 2,371 2,371
@material-ui/core/TrapFocus 0.00% 0.00% 3,808 3,808 1,600 1,600
@material-ui/core/styles/createMuiTheme 0.00% 0.00% 16,161 16,161 5,814 5,814
@material-ui/core/useMediaQuery 0.00% 0.00% 3,101 3,101 1,317 1,317
@material-ui/lab 0.00% 0.00% 141,941 141,941 43,683 43,683
@material-ui/styles 0.00% 0.00% 51,628 51,628 15,408 15,408
@material-ui/system 0.00% 0.00% 15,573 15,573 4,439 4,439
Button 0.00% 0.00% 79,805 79,805 24,362 24,362
Modal 0.00% 0.00% 14,643 14,643 5,229 5,229
Portal 0.00% 0.00% 3,484 3,484 1,565 1,565
Rating 0.00% 0.00% 70,558 70,558 22,099 22,099
Slider 0.00% 0.00% 75,332 75,332 23,344 23,344
colorManipulator 0.00% 0.00% 3,904 3,904 1,543 1,543
docs.landing 0.00% 0.00% 52,093 52,093 13,814 13,814
docs.main 0.00% 0.00% 604,388 604,399 193,891 193,894
packages/material-ui/build/umd/material-ui.production.min.js 0.00% 0.00% 301,614 301,614 86,717 86,717
docs: / 0.00% 0.00% 56,000 56,000 -1 -1
docs: /_app +1.46% 🔺 0.00% 137,000 139,000 -1 -1
docs: /_error 0.00% 0.00% 2,110 2,110 -1 -1
docs: /blog/2019-developer-survey-results 0.00% 0.00% 13,600 13,600 -1 -1
docs: /blog/april-2019-update 0.00% 0.00% 4,620 4,620 -1 -1
docs: /blog/june-2019-update 0.00% 0.00% 2,200 2,200 -1 -1
docs: /blog/march-2019-update 0.00% 0.00% 3,180 3,180 -1 -1
docs: /blog/material-ui-v4-is-out 0.00% 0.00% 22,600 22,600 -1 -1
docs: /blog/may-2019-update 0.00% 0.00% 2,750 2,750 -1 -1
docs: /components-api/app-bar +Infinity% 🔺 -Infinity% 0 4,130 0 -1
docs: /components-api/avatar +Infinity% 🔺 -Infinity% 0 3,590 0 -1
docs: /components-api/backdrop +Infinity% 🔺 -Infinity% 0 2,840 0 -1
docs: /components-api/badge +Infinity% 🔺 -Infinity% 0 4,210 0 -1
docs: /components-api/bottom-navigation +Infinity% 🔺 -Infinity% 0 3,280 0 -1
docs: /components-api/bottom-navigation-action +Infinity% 🔺 -Infinity% 0 3,750 0 -1
docs: /components-api/breadcrumbs +Infinity% 🔺 -Infinity% 0 3,670 0 -1
docs: /components-api/button +Infinity% 🔺 -Infinity% 0 6,530 0 -1
docs: /components-api/button-base +Infinity% 🔺 -Infinity% 0 5,820 0 -1
docs: /components-api/button-group +Infinity% 🔺 -Infinity% 0 5,170 0 -1
docs: /components-api/card +Infinity% 🔺 -Infinity% 0 2,450 0 -1
docs: /components-api/card-action-area +Infinity% 🔺 -Infinity% 0 2,800 0 -1
docs: /components-api/card-actions +Infinity% 🔺 -Infinity% 0 2,550 0 -1
docs: /components-api/card-content +Infinity% 🔺 -Infinity% 0 2,360 0 -1
docs: /components-api/card-header +Infinity% 🔺 -Infinity% 0 4,030 0 -1
docs: /components-api/card-media +Infinity% 🔺 -Infinity% 0 2,950 0 -1
docs: /components-api/checkbox +Infinity% 🔺 -Infinity% 0 5,790 0 -1
docs: /components-api/chip +Infinity% 🔺 -Infinity% 0 7,580 0 -1
docs: /components-api/circular-progress +Infinity% 🔺 -Infinity% 0 4,820 0 -1
docs: /components-api/click-away-listener +Infinity% 🔺 -Infinity% 0 2,450 0 -1
docs: /components-api/collapse +Infinity% 🔺 -Infinity% 0 4,350 0 -1
docs: /components-api/container +Infinity% 🔺 -Infinity% 0 3,720 0 -1
docs: /components-api/css-baseline +Infinity% 🔺 -Infinity% 0 1,380 0 -1
docs: /components-api/dialog +Infinity% 🔺 -Infinity% 0 8,010 0 -1
docs: /components-api/dialog-actions +Infinity% 🔺 -Infinity% 0 2,570 0 -1
docs: /components-api/dialog-content +Infinity% 🔺 -Infinity% 0 2,550 0 -1
docs: /components-api/dialog-content-text +Infinity% 🔺 -Infinity% 0 2,550 0 -1
docs: /components-api/dialog-title +Infinity% 🔺 -Infinity% 0 2,550 0 -1
docs: /components-api/divider +Infinity% 🔺 -Infinity% 0 3,330 0 -1
docs: /components-api/drawer +Infinity% 🔺 -Infinity% 0 5,650 0 -1
docs: /components-api/expansion-panel +Infinity% 🔺 -Infinity% 0 4,050 0 -1
docs: /components-api/expansion-panel-actions +Infinity% 🔺 -Infinity% 0 2,690 0 -1
docs: /components-api/expansion-panel-details +Infinity% 🔺 -Infinity% 0 2,410 0 -1
docs: /components-api/expansion-panel-summary +Infinity% 🔺 -Infinity% 0 3,510 0 -1
docs: /components-api/fab +Infinity% 🔺 -Infinity% 0 5,190 0 -1
docs: /components-api/fade +Infinity% 🔺 -Infinity% 0 2,390 0 -1
docs: /components-api/filled-input +Infinity% 🔺 -Infinity% 0 8,710 0 -1
docs: /components-api/form-control +Infinity% 🔺 -Infinity% 0 5,290 0 -1
docs: /components-api/form-control-label +Infinity% 🔺 -Infinity% 0 4,580 0 -1
docs: /components-api/form-group +Infinity% 🔺 -Infinity% 0 2,710 0 -1
docs: /components-api/form-helper-text +Infinity% 🔺 -Infinity% 0 4,430 0 -1
docs: /components-api/form-label +Infinity% 🔺 -Infinity% 0 3,920 0 -1
docs: /components-api/grid +Infinity% 🔺 -Infinity% 0 9,220 0 -1
docs: /components-api/grid-list +Infinity% 🔺 -Infinity% 0 3,090 0 -1
docs: /components-api/grid-list-tile +Infinity% 🔺 -Infinity% 0 3,400 0 -1
docs: /components-api/grid-list-tile-bar +Infinity% 🔺 -Infinity% 0 4,190 0 -1
docs: /components-api/grow +Infinity% 🔺 -Infinity% 0 2,560 0 -1
docs: /components-api/hidden +Infinity% 🔺 -Infinity% 0 4,200 0 -1
docs: /components-api/icon +Infinity% 🔺 -Infinity% 0 3,870 0 -1
docs: /components-api/icon-button +Infinity% 🔺 -Infinity% 0 4,990 0 -1
docs: /components-api/input +Infinity% 🔺 -Infinity% 0 8,190 0 -1
docs: /components-api/input-adornment +Infinity% 🔺 -Infinity% 0 4,240 0 -1
docs: /components-api/input-base +Infinity% 🔺 -Infinity% 0 8,930 0 -1
docs: /components-api/input-label +Infinity% 🔺 -Infinity% 0 4,920 0 -1
docs: /components-api/linear-progress +Infinity% 🔺 -Infinity% 0 5,470 0 -1
docs: /components-api/link +Infinity% 🔺 -Infinity% 0 4,130 0 -1
docs: /components-api/list +Infinity% 🔺 -Infinity% 0 3,410 0 -1
docs: /components-api/list-item +Infinity% 🔺 -Infinity% 0 5,950 0 -1
docs: /components-api/list-item-avatar +Infinity% 🔺 -Infinity% 0 2,530 0 -1
docs: /components-api/list-item-icon +Infinity% 🔺 -Infinity% 0 2,570 0 -1
docs: /components-api/list-item-secondary-action +Infinity% 🔺 -Infinity% 0 2,490 0 -1
docs: /components-api/list-item-text +Infinity% 🔺 -Infinity% 0 4,060 0 -1
docs: /components-api/list-subheader +Infinity% 🔺 -Infinity% 0 3,950 0 -1
docs: /components-api/menu +Infinity% 🔺 -Infinity% 0 5,380 0 -1
docs: /components-api/menu-item +Infinity% 🔺 -Infinity% 0 3,370 0 -1
docs: /components-api/menu-list +Infinity% 🔺 -Infinity% 0 2,000 0 -1
docs: /components-api/mobile-stepper +Infinity% 🔺 -Infinity% 0 4,430 0 -1
docs: /components-api/modal +Infinity% 🔺 -Infinity% 0 6,090 0 -1
docs: /components-api/native-select +Infinity% 🔺 -Infinity% 0 4,390 0 -1
docs: /components-api/no-ssr +Infinity% 🔺 -Infinity% 0 2,070 0 -1
docs: /components-api/outlined-input +Infinity% 🔺 -Infinity% 0 8,750 0 -1
docs: /components-api/paper +Infinity% 🔺 -Infinity% 0 4,200 0 -1
docs: /components-api/popover +Infinity% 🔺 -Infinity% 0 8,470 0 -1
docs: /components-api/popper +Infinity% 🔺 -Infinity% 0 4,530 0 -1
docs: /components-api/portal +Infinity% 🔺 -Infinity% 0 2,220 0 -1
docs: /components-api/radio +Infinity% 🔺 -Infinity% 0 5,000 0 -1
docs: /components-api/radio-group +Infinity% 🔺 -Infinity% 0 2,410 0 -1
docs: /components-api/rating +Infinity% 🔺 -Infinity% 0 6,310 0 -1
docs: /components-api/root-ref +Infinity% 🔺 -Infinity% 0 2,410 0 -1
docs: /components-api/select +Infinity% 🔺 -Infinity% 0 7,160 0 -1
docs: /components-api/slide +Infinity% 🔺 -Infinity% 0 2,830 0 -1
docs: /components-api/slider +Infinity% 🔺 -Infinity% 0 8,240 0 -1
docs: /components-api/snackbar +Infinity% 🔺 -Infinity% 0 7,530 0 -1
docs: /components-api/snackbar-content +Infinity% 🔺 -Infinity% 0 2,820 0 -1
docs: /components-api/speed-dial +Infinity% 🔺 -Infinity% 0 5,560 0 -1
docs: /components-api/speed-dial-action +Infinity% 🔺 -Infinity% 0 3,880 0 -1
docs: /components-api/speed-dial-icon +Infinity% 🔺 -Infinity% 0 3,000 0 -1
docs: /components-api/step +Infinity% 🔺 -Infinity% 0 3,300 0 -1
docs: /components-api/step-button +Infinity% 🔺 -Infinity% 0 3,090 0 -1
docs: /components-api/step-connector +Infinity% 🔺 -Infinity% 0 3,130 0 -1
docs: /components-api/step-content +Infinity% 🔺 -Infinity% 0 3,210 0 -1
docs: /components-api/step-icon +Infinity% 🔺 -Infinity% 0 3,140 0 -1
docs: /components-api/step-label +Infinity% 🔺 -Infinity% 0 4,480 0 -1
docs: /components-api/stepper +Infinity% 🔺 -Infinity% 0 3,840 0 -1
docs: /components-api/svg-icon +Infinity% 🔺 -Infinity% 0 5,220 0 -1
docs: /components-api/swipeable-drawer +Infinity% 🔺 -Infinity% 0 4,360 0 -1
docs: /components-api/switch +Infinity% 🔺 -Infinity% 0 6,430 0 -1
docs: /components-api/tab +Infinity% 🔺 -Infinity% 0 4,830 0 -1
docs: /components-api/table +Infinity% 🔺 -Infinity% 0 2,980 0 -1
docs: /components-api/table-body +Infinity% 🔺 -Infinity% 0 2,490 0 -1
docs: /components-api/table-cell +Infinity% 🔺 -Infinity% 0 5,010 0 -1
docs: /components-api/table-footer +Infinity% 🔺 -Infinity% 0 2,510 0 -1
docs: /components-api/table-head +Infinity% 🔺 -Infinity% 0 2,490 0 -1
docs: /components-api/table-pagination +Infinity% 🔺 -Infinity% 0 6,140 0 -1
docs: /components-api/table-row +Infinity% 🔺 -Infinity% 0 3,350 0 -1
docs: /components-api/table-sort-label +Infinity% 🔺 -Infinity% 0 3,790 0 -1
docs: /components-api/tabs +Infinity% 🔺 -Infinity% 0 6,890 0 -1
docs: /components-api/text-field +Infinity% 🔺 -Infinity% 0 8,880 0 -1
docs: /components-api/textarea-autosize +Infinity% 🔺 -Infinity% 0 1,640 0 -1
docs: /components-api/toggle-button +Infinity% 🔺 -Infinity% 0 3,930 0 -1
docs: /components-api/toggle-button-group +Infinity% 🔺 -Infinity% 0 3,430 0 -1
docs: /components-api/toolbar +Infinity% 🔺 -Infinity% 0 3,180 0 -1
docs: /components-api/tooltip +Infinity% 🔺 -Infinity% 0 6,880 0 -1
docs: /components-api/touch-ripple +Infinity% 🔺 -Infinity% 0 3,210 0 -1
docs: /components-api/typography +Infinity% 🔺 -Infinity% 0 7,790 0 -1
docs: /components-api/zoom +Infinity% 🔺 -Infinity% 0 2,480 0 -1
docs: /components/about-the-lab 0.00% 0.00% 6,370 6,370 -1 -1
docs: /components/app-bar 0.00% 0.00% 135,000 135,000 -1 -1
docs: /components/autocomplete 0.00% 0.00% 291,000 291,000 -1 -1
docs: /components/avatars 0.00% 0.00% 27,000 27,000 -1 -1
docs: /components/badges +0.16% 🔺 0.00% 61,500 61,600 -1 -1
docs: /components/bottom-navigation 0.00% 0.00% 26,900 26,900 -1 -1
docs: /components/box 0.00% 0.00% 32,800 32,800 -1 -1
docs: /components/breadcrumbs 0.00% 0.00% 97,400 97,400 -1 -1
docs: /components/buttons 0.00% 0.00% 236,000 236,000 -1 -1
docs: /components/cards 0.00% 0.00% 72,900 72,900 -1 -1
docs: /components/checkboxes 0.00% 0.00% 69,300 69,300 -1 -1
docs: /components/chips 0.00% 0.00% 115,000 115,000 -1 -1
docs: /components/click-away-listener 0.00% 0.00% 13,300 13,300 -1 -1
docs: /components/container 0.00% 0.00% 13,300 13,300 -1 -1
docs: /components/css-baseline 0.00% 0.00% 20,100 20,100 -1 -1
docs: /components/dialogs 0.00% 0.00% 224,000 224,000 -1 -1
docs: /components/dividers 0.00% 0.00% 51,000 51,000 -1 -1
docs: /components/drawers 0.00% 0.00% 229,000 229,000 -1 -1
docs: /components/expansion-panels 0.00% 0.00% 83,700 83,700 -1 -1
docs: /components/grid 0.00% 0.00% 153,000 153,000 -1 -1
docs: /components/grid-list 0.00% 0.00% 57,300 57,300 -1 -1
docs: /components/hidden 0.00% 0.00% 55,100 55,100 -1 -1
docs: /components/icons 0.00% 0.00% 146,000 146,000 -1 -1
docs: /components/links 0.00% 0.00% 50,500 50,500 -1 -1
docs: /components/lists 0.00% 0.00% 157,000 157,000 -1 -1
docs: /components/menus 0.00% 0.00% 89,400 89,400 -1 -1
docs: /components/modal 0.00% 0.00% 37,300 37,300 -1 -1
docs: /components/no-ssr 0.00% 0.00% 15,800 15,800 -1 -1
docs: /components/paper 0.00% 0.00% 9,510 9,510 -1 -1
docs: /components/pickers 0.00% 0.00% 196,000 196,000 -1 -1
docs: /components/popover 0.00% 0.00% 70,100 70,100 -1 -1
docs: /components/popper 0.00% 0.00% 118,000 118,000 -1 -1
docs: /components/portal 0.00% 0.00% 12,100 12,100 -1 -1
docs: /components/progress 0.00% 0.00% 103,000 103,000 -1 -1
docs: /components/radio-buttons 0.00% 0.00% 58,800 58,800 -1 -1
docs: /components/rating 0.00% 0.00% 51,600 51,600 -1 -1
docs: /components/selects 0.00% 0.00% 170,000 170,000 -1 -1
docs: /components/slider 0.00% 0.00% 80,200 80,200 -1 -1
docs: /components/snackbars 0.00% 0.00% 121,000 121,000 -1 -1
docs: /components/speed-dial 0.00% 0.00% 55,400 55,400 -1 -1
docs: /components/steppers 0.00% 0.00% 208,000 208,000 -1 -1
docs: /components/switches 0.00% 0.00% 77,900 77,900 -1 -1
docs: /components/tables 0.00% 0.00% 756,000 756,000 -1 -1
docs: /components/tabs 0.00% 0.00% 168,000 168,000 -1 -1
docs: /components/text-fields 0.00% 0.00% 314,000 314,000 -1 -1
docs: /components/textarea-autosize 0.00% 0.00% 9,750 9,750 -1 -1
docs: /components/toggle-button 0.00% 0.00% 22,300 22,300 -1 -1
docs: /components/tooltips 0.00% 0.00% 96,000 96,000 -1 -1
docs: /components/transfer-list 0.00% 0.00% 48,800 48,800 -1 -1
docs: /components/transitions 0.00% 0.00% 58,400 58,400 -1 -1
docs: /components/typography +0.25% 🔺 0.00% 39,700 39,800 -1 -1
docs: /components/use-media-query 0.00% 0.00% 60,600 60,600 -1 -1
docs: /customization/breakpoints 0.00% 0.00% 80,500 80,500 -1 -1
docs: /customization/color 0.00% 0.00% 99,900 99,900 -1 -1
docs: /customization/components 0.00% 0.00% 165,000 165,000 -1 -1
docs: /customization/default-theme 0.00% 0.00% 55,500 55,500 -1 -1
docs: /customization/density 0.00% 0.00% 39,700 39,700 -1 -1
docs: /customization/globals 0.00% 0.00% 19,800 19,800 -1 -1
docs: /customization/palette 0.00% 0.00% 57,500 57,500 -1 -1
docs: /customization/spacing 0.00% 0.00% 12,600 12,600 -1 -1
docs: /customization/themes 0.00% 0.00% 62,800 62,800 -1 -1
docs: /customization/typography 0.00% 0.00% 428,000 428,000 -1 -1
docs: /customization/z-index 0.00% 0.00% 9,730 9,730 -1 -1
docs: /discover-more/backers 0.00% 0.00% 6,840 6,840 -1 -1
docs: /discover-more/changelog 0.00% 0.00% 3,560 3,560 -1 -1
docs: /discover-more/community 0.00% 0.00% 5,440 5,440 -1 -1
docs: /discover-more/governance 0.00% 0.00% 6,800 6,800 -1 -1
docs: /discover-more/languages 0.00% 0.00% 10,600 10,600 -1 -1
docs: /discover-more/related-projects 0.00% 0.00% 18,800 18,800 -1 -1
docs: /discover-more/roadmap +0.15% 🔺 0.00% 6,590 6,600 -1 -1
docs: /discover-more/showcase 0.00% 0.00% 72,600 72,600 -1 -1
docs: /discover-more/team 0.00% 0.00% 22,800 22,800 -1 -1
docs: /discover-more/vision 0.00% 0.00% 19,100 19,100 -1 -1
docs: /getting-started/example-projects 0.00% 0.00% 24,000 24,000 -1 -1
docs: /getting-started/faq 0.00% 0.00% 154,000 154,000 -1 -1
docs: /getting-started/installation 0.00% 0.00% 31,600 31,600 -1 -1
docs: /getting-started/learn 0.00% 0.00% 37,200 37,200 -1 -1
docs: /getting-started/supported-components 0.00% 0.00% 73,800 73,800 -1 -1
docs: /getting-started/supported-platforms 0.00% 0.00% 23,800 23,800 -1 -1
docs: /getting-started/templates 0.00% 0.00% 18,000 18,000 -1 -1
docs: /getting-started/templates/album 0.00% 0.00% 10,800 10,800 -1 -1
docs: /getting-started/templates/blog 0.00% 0.00% 33,500 33,500 -1 -1
docs: /getting-started/templates/checkout 0.00% 0.00% 51,900 51,900 -1 -1
docs: /getting-started/templates/dashboard 0.00% 0.00% 391,000 391,000 -1 -1
docs: /getting-started/templates/pricing 0.00% 0.00% 22,500 22,500 -1 -1
docs: /getting-started/templates/sign-in 0.00% 0.00% 49,400 49,400 -1 -1
docs: /getting-started/templates/sign-in-side 0.00% 0.00% 49,700 49,700 -1 -1
docs: /getting-started/templates/sign-up 0.00% 0.00% 49,900 49,900 -1 -1
docs: /getting-started/templates/sticky-footer 0.00% 0.00% 2,080 2,080 -1 -1
docs: /getting-started/usage 0.00% 0.00% 32,200 32,200 -1 -1
docs: /guides/api 0.00% 0.00% 62,100 62,100 -1 -1
docs: /guides/composition 0.00% 0.00% 104,000 104,000 -1 -1
docs: /guides/flow 0.00% 0.00% 6,690 6,690 -1 -1
docs: /guides/interoperability 0.00% 0.00% 187,000 187,000 -1 -1
docs: /guides/migration-v0x 0.00% 0.00% 52,300 52,300 -1 -1
docs: /guides/migration-v3 0.00% 0.00% 131,000 131,000 -1 -1
docs: /guides/minimizing-bundle-size 0.00% 0.00% 45,500 45,500 -1 -1
docs: /guides/responsive-ui 0.00% 0.00% 14,400 14,400 -1 -1
docs: /guides/right-to-left 0.00% 0.00% 49,800 49,800 -1 -1
docs: /guides/server-rendering 0.00% 0.00% 58,500 58,500 -1 -1
docs: /guides/testing 0.00% 0.00% 53,900 53,900 -1 -1
docs: /guides/typescript 0.00% 0.00% 80,100 80,100 -1 -1
docs: /performance/table-component 0.00% 0.00% 1,340 1,340 -1 -1
docs: /performance/table-emotion 0.00% 0.00% 25,900 25,900 -1 -1
docs: /performance/table-hook 0.00% 0.00% 1,420 1,420 -1 -1
docs: /performance/table-mui 0.00% 0.00% 6,750 6,750 -1 -1
docs: /performance/table-raw 0.00% 0.00% 1,110 1,110 -1 -1
docs: /performance/table-styled-components 0.00% 0.00% 44,700 44,700 -1 -1
docs: /premium-themes/onepirate 0.00% 0.00% 55,400 55,400 -1 -1
docs: /premium-themes/onepirate/forgot-password 0.00% 0.00% 83,400 83,400 -1 -1
docs: /premium-themes/onepirate/privacy 0.00% 0.00% 76,200 76,200 -1 -1
docs: /premium-themes/onepirate/sign-in 0.00% 0.00% 83,800 83,800 -1 -1
docs: /premium-themes/onepirate/sign-up 0.00% 0.00% 84,000 84,000 -1 -1
docs: /premium-themes/onepirate/terms 0.00% 0.00% 99,000 99,000 -1 -1
docs: /premium-themes/paperbase 0.00% 0.00% 59,600 59,600 -1 -1
docs: /styles/advanced 0.00% 0.00% 241,000 241,000 -1 -1
docs: /styles/api 0.00% 0.00% 126,000 126,000 -1 -1
docs: /styles/basics 0.00% 0.00% 89,700 89,700 -1 -1
docs: /system/api 0.00% 0.00% 77,700 77,700 -1 -1
docs: /system/basics 0.00% 0.00% 191,000 191,000 -1 -1
docs: /system/borders 0.00% 0.00% 40,100 40,100 -1 -1
docs: /system/display 0.00% 0.00% 59,800 59,800 -1 -1
docs: /system/flexbox 0.00% 0.00% 70,100 70,100 -1 -1
docs: /system/palette 0.00% 0.00% 29,400 29,400 -1 -1
docs: /system/positions 0.00% 0.00% 23,800 23,800 -1 -1
docs: /system/shadows 0.00% 0.00% 23,400 23,400 -1 -1
docs: /system/sizing 0.00% 0.00% 31,700 31,700 -1 -1
docs: /system/spacing 0.00% 0.00% 51,500 51,500 -1 -1
docs: /system/typography 0.00% 0.00% 46,900 46,900 -1 -1
docs: /versions 0.00% 0.00% 77,100 77,100 -1 -1

Generated by 🚫 dangerJS against 55a3a79

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Jul 25, 2019

docs: /components-api/touch-ripple | +Infinity% 🔺 | -Infinity% | 0 | 3,210 | 0 | -1
-- | -- | -- | -- | -- | -- | --

Do we care about these pages? They are all the same. Should we ignore them?

@@ -40,6 +40,8 @@ https://material-ui.dev/* https://material-ui.com/:splat 301!
/lab/* /components/:splat 301
/css-in-js/* /styles/:splat 301
/premium-themes* https://themes.material-ui.com/ 301
/api/* /components-api/:splat 301
Copy link
Member

@merceyz merceyz Jul 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this redirects all /api paths, how would one use the new feature(add an API page)? Would it just be to use some other path manually added to server.js?
I tried to add an API page yesterday but kept on getting errors, now I see why.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't thought about it. What would be the use case for us? Maybe we would host it on a different domain?

@eps1lon
Copy link
Member

eps1lon commented Jul 26, 2019

We rename the /api/x routes. These pages have low SEO value for us. We will have to handle the 301 logic.

What does that mean? They rank right behind /components for some components.

Have you any information if they consider making the name of the api routes configurable? I get their paradigm but every new feature imposes a new convention that's a breaking change making it hard and harder to use. Especially the generic api term should be configurable.

@eps1lon
Copy link
Member

eps1lon commented Jul 26, 2019

Until we've heard back from nextjs we should revert the upgrade before the next release. Maybe we can configure it in a later feature release. I would expect moving them might be less than ideal concerning SEO and we shouldn't be eager to assume they have no value. At least next@9 didn't have any user-facing features.

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Jul 26, 2019

Have you any information if they consider making the name of the api routes configurable?

@eps1lon I have opened an issue on Next.js side: vercel/next.js#8123. We will get a public answer there.


I have had a closer look at the SEO situation of /components vs /api.

Ahrefs stats:

/components/ prefix

Capture d’écran 2019-07-26 à 11 23 29

/api/ prefix

Capture d’écran 2019-07-26 à 11 23 20

GA stats for the landing pages

Capture d’écran 2019-07-26 à 11 29 22

Top api keywords:

Capture d’écran 2019-07-26 à 12 06 01

Keywords cannibalization issue

Following https://www.semrush.com/blog/keyword-cannibalization-harming-on-site-seo/, we might have had a keyword cannibalization issue. Google seems to progressively recognize that the components pages are what people are most of the time looking for. We have some trace of this issue, it might never be completely solved:

  • grid: yields the API page first, at the position n°16, far behind. There is no trace of the components page, that's a problem.

  • material paper yields the API page first, while it should be component page.

  • react dialog was returning the API page as position n°1

    Capture d’écran 2019-07-26 à 11 41 12
    it recently changes for the component page.

Hopefully, as more user clicks on links, Google gets more information and will solve 100% of the cases.


Out of this data, I get the following conclusions:

  • Most people are looking for the /components pages when searching on Google the generic component names, not the /api pages When they do, they suffix the query with api.
  • People spend more time on the /components pages than on the api pages.
  • Because the /api pages are returned on low competitive queries (e.g. they rank well for material-ui dialog, not dialog), introducing 301 redirections won't harm our SERP much, hence the traffic generated. Also because they generate relatively few traffic, we can take more risks with them.
  • The /api pages have a x4 stronger backlink profile, something we don't leverage to improve the ranking of the components pages. Maybe there is a missed opportunity here 😄. It's an assets we shouldn't loose/waste.

I propose the following short term plan of action:

cc @mbrookes

In the long term, we need to find a way to leverage the api backlinks, very important!

@eps1lon
Copy link
Member

eps1lon commented Jul 26, 2019

I'm mostly concerned about potential negative impact on renaming so many routes. If this isn't an issue then we can proceed with this approach rather than reverting.

I'm still concerned about merging the API into the demo page. It's seemingly nice to have everything in one place as a introduction but for extended usage I wouldn't want to clutter API with examples.

Especially since I can't reproduce these search term issues. Normal google, incognito google as well as duckduckgo give me for "material-ui grid" the demo page before the API page. I wouldn't be too concerned with generic search terms such as "grid". In duckduckgo "react grid" gives the components page on the first page. "material paper" gives the component page as well (which is quite impressive tbh, usually "material" is not associated with our library).

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Jul 26, 2019

Let's revert to Next v8, there is no need to rush it. the API pages generate 1/4 of our traffic. Might not risk it.

@oliviertassinari
Copy link
Member Author

My fear n°1 is that Google will have to relearn the difference between /components and /components-api if we rename the pages.

@oliviertassinari oliviertassinari deleted the docs-api-rename branch February 8, 2020 20:42
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.

4 participants