-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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 SEO reported by Ahrefs #16765
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,13 @@ | ||
import 'docs/src/modules/components/bootstrap'; | ||
// --- Post bootstrap ----- | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { connect } from 'react-redux'; | ||
import AppTheme from 'docs/src/modules/components/AppTheme'; | ||
import Album from 'docs/src/pages/getting-started/templates/album/Album'; | ||
|
||
function Page(props) { | ||
export default function Page() { | ||
return ( | ||
<AppTheme title="Album page layout - Material-UI" description={props.t('albumDescr')}> | ||
<AppTheme> | ||
<Album /> | ||
</AppTheme> | ||
); | ||
} | ||
|
||
Page.propTypes = { | ||
t: PropTypes.func.isRequired, | ||
}; | ||
|
||
export default connect(state => ({ t: state.options.t }))(Page); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,13 @@ | ||
import 'docs/src/modules/components/bootstrap'; | ||
// --- Post bootstrap ----- | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { connect } from 'react-redux'; | ||
import AppTheme from 'docs/src/modules/components/AppTheme'; | ||
import Blog from 'docs/src/pages/getting-started/templates/blog/Blog'; | ||
|
||
function Page(props) { | ||
export default function Page() { | ||
return ( | ||
<AppTheme title="Blog page layout example - Material-UI" description={props.t('blogDescr')}> | ||
<AppTheme> | ||
<Blog /> | ||
</AppTheme> | ||
); | ||
} | ||
|
||
Page.propTypes = { | ||
t: PropTypes.func.isRequired, | ||
}; | ||
|
||
export default connect(state => ({ t: state.options.t }))(Page); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,13 @@ | ||
import 'docs/src/modules/components/bootstrap'; | ||
// --- Post bootstrap ----- | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { connect } from 'react-redux'; | ||
import AppTheme from 'docs/src/modules/components/AppTheme'; | ||
import Dashboard from 'docs/src/pages/getting-started/templates/dashboard/Dashboard'; | ||
|
||
function Page(props) { | ||
export default function Page() { | ||
return ( | ||
<AppTheme | ||
title="Dashboard page layout example - Material-UI" | ||
description={props.t('dashboardDescr')} | ||
> | ||
<AppTheme> | ||
<Dashboard /> | ||
</AppTheme> | ||
); | ||
} | ||
|
||
Page.propTypes = { | ||
t: PropTypes.func.isRequired, | ||
}; | ||
|
||
export default connect(state => ({ t: state.options.t }))(Page); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,13 @@ | ||
import 'docs/src/modules/components/bootstrap'; | ||
// --- Post bootstrap ----- | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { connect } from 'react-redux'; | ||
import AppTheme from 'docs/src/modules/components/AppTheme'; | ||
import Pricing from 'docs/src/pages/getting-started/templates/pricing/Pricing'; | ||
|
||
function Page(props) { | ||
export default function Page() { | ||
return ( | ||
<AppTheme | ||
title="Pricing page layout example - Material-UI" | ||
description={props.t('pricingDescr')} | ||
> | ||
<AppTheme> | ||
<Pricing /> | ||
</AppTheme> | ||
); | ||
} | ||
|
||
Page.propTypes = { | ||
t: PropTypes.func.isRequired, | ||
}; | ||
|
||
export default connect(state => ({ t: state.options.t }))(Page); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,13 @@ | ||
import 'docs/src/modules/components/bootstrap'; | ||
// --- Post bootstrap ----- | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { connect } from 'react-redux'; | ||
import AppTheme from 'docs/src/modules/components/AppTheme'; | ||
import SignInSide from 'docs/src/pages/getting-started/templates/sign-in-side/SignInSide'; | ||
|
||
function Page(props) { | ||
export default function Page() { | ||
return ( | ||
<AppTheme | ||
title="Sign In side page layout example - Material-UI" | ||
description={props.t('signInSideDescr')} | ||
> | ||
<AppTheme> | ||
<SignInSide /> | ||
</AppTheme> | ||
); | ||
} | ||
|
||
Page.propTypes = { | ||
t: PropTypes.func.isRequired, | ||
}; | ||
|
||
export default connect(state => ({ t: state.options.t }))(Page); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,13 @@ | ||
import 'docs/src/modules/components/bootstrap'; | ||
// --- Post bootstrap ----- | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { connect } from 'react-redux'; | ||
import AppTheme from 'docs/src/modules/components/AppTheme'; | ||
import SignIn from 'docs/src/pages/getting-started/templates/sign-in/SignIn'; | ||
|
||
function Page(props) { | ||
export default function Page() { | ||
return ( | ||
<AppTheme | ||
title="Sign In page layout example - Material-UI" | ||
description={props.t('signInDescr')} | ||
> | ||
<AppTheme> | ||
<SignIn /> | ||
</AppTheme> | ||
); | ||
} | ||
|
||
Page.propTypes = { | ||
t: PropTypes.func.isRequired, | ||
}; | ||
|
||
export default connect(state => ({ t: state.options.t }))(Page); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,13 @@ | ||
import 'docs/src/modules/components/bootstrap'; | ||
// --- Post bootstrap ----- | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { connect } from 'react-redux'; | ||
import AppTheme from 'docs/src/modules/components/AppTheme'; | ||
import SignUp from 'docs/src/pages/getting-started/templates/sign-up/SignUp'; | ||
|
||
function Page(props) { | ||
export default function Page() { | ||
return ( | ||
<AppTheme | ||
title="Sign Up page layout example - Material-UI" | ||
description={props.t('signUpDescr')} | ||
> | ||
<AppTheme> | ||
<SignUp /> | ||
</AppTheme> | ||
); | ||
} | ||
|
||
Page.propTypes = { | ||
t: PropTypes.func.isRequired, | ||
}; | ||
|
||
export default connect(state => ({ t: state.options.t }))(Page); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,13 @@ | ||
import 'docs/src/modules/components/bootstrap'; | ||
// --- Post bootstrap ----- | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { connect } from 'react-redux'; | ||
import AppTheme from 'docs/src/modules/components/AppTheme'; | ||
import StickyFooter from 'docs/src/pages/getting-started/templates/sticky-footer/StickyFooter'; | ||
|
||
function Page(props) { | ||
export default function Page() { | ||
return ( | ||
<AppTheme | ||
title="Sticky footer page layout example - Material-UI" | ||
description={props.t('stickyFooterDescr')} | ||
> | ||
<AppTheme> | ||
<StickyFooter /> | ||
</AppTheme> | ||
); | ||
} | ||
|
||
Page.propTypes = { | ||
t: PropTypes.func.isRequired, | ||
}; | ||
|
||
export default connect(state => ({ t: state.options.t }))(Page); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Would it make sense to lint for these issues? I see this change fairly often. Best with a rationale included which I'm still missing: What is the difference between trailing slash and not? From a server perspective the trailing slash isn't accurate because they don't live in api/button/index.js but api/button.js.
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.
You get the underlying subfolder/index.html vs subfolder.html difference right. It seems to be a legacy issue. Next.js used to add a leading slash automatically, with no way to change it, until v9: vercel/next.js#2944.
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.
So the issue is that it creates a 301 without the trailing slash?
If the trailing slash has no other implications we might as well use the default behavior instead.
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.
Yes, the issue is the 301 we have right now in production.
What default behavior do you refer to?
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 one from next adding trailing slashes to every link.
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 doesn't handle 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.
As we are using a custom express server now, we could make the dev env have trailing slashs, to behave like production.