-
Notifications
You must be signed in to change notification settings - Fork 10.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
chore(starters): Migrate starters to Head API #36234
Conversation
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 should run prettier on every starter, the formatting feels off here and there (weird spaces between brackets for example)
You'll also need to update all package-lock.json files
Co-authored-by: Lennart <lekoarts@gmail.com>
Co-authored-by: Lennart <lekoarts@gmail.com>
@@ -65,6 +63,8 @@ const BlogIndex = ({ data, location }) => { | |||
|
|||
export default BlogIndex | |||
|
|||
export const Head = () => <Seo title="All posts" /> |
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.
Really nice and simple refactor / API here @marvinjude. Nicely done.
@@ -4,4 +4,6 @@ | |||
* See: https://www.gatsbyjs.com/docs/ssr-apis/ | |||
*/ | |||
|
|||
// You can delete this file if you're not using it | |||
exports.onRenderBody = ({ setHtmlAttributes }) => { | |||
setHtmlAttributes({ lang: `en` }) |
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.
Should or have we documented this? (I've typically myself set the html attributes with the Helmet component, so it's possible that's still documented somewhere!)
The context: it's a reasonably common use case for folks, and if I recall, it's one thing that Lighthouse recommends too.
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.
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.
Thank you!
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 starters_validate test fails. Can you look into that?
Yep! It's all good now |
Migrate Starters to Head API
[sc-53425]