-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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] Fix <title> generation #11182
[docs-infra] Fix <title> generation #11182
Conversation
Deploy preview: https://deploy-preview-11182--material-ui-x.netlify.app/ |
7e04ca1
to
f8e5d7c
Compare
@@ -105,6 +105,7 @@ module.exports = withDocsInfra({ | |||
}, | |||
}; | |||
}, | |||
distDir: 'export', | |||
// Next.js provides a `defaultPathMap` argument, we could simplify the logic. | |||
// However, we don't in order to prevent any regression in the `findPages()` method. | |||
exportPathMap: () => { |
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.
Next.js deprecating this https://nextjs.org/docs/app/api-reference/next-config-js/exportPathMap worries me. How are we supposed to have pages under /api/ once exportPathMap
is gone? But I guess that now since we have product folded prefixes in the URLs, we don't need to worry about the conflict with the Next.js backend API route. We can rename api-docs
-> api
everywhere (as it used to be before Next.js introduced the name conflict with its API route in v9 https://nextjs.org/blog/next-9#api-routes).
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 can confirm it works (title is present in the HTML file sent by server call) but I've know idea about why
@alexfauquette Yeah, strange, moving from We can replicate this in https://github.com/mui/material-ui. |
A regression introduced from #10795, see #10539 for the context of what's the regression.
I didn't expect it would be easy to fix. At first, I was going to encourage a revert, using #10539 as why. But while I was refining the reproduction to raise the issue to the Next.js team vercel/next.js#55817 (comment), creating a reproduction in https://github.com/oliviertassinari/next-55817, I found by chance that following the proposed upgrade path solved the issue.