-
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
enhancement (docs, www): MDX component alias #23209
Conversation
# Conflicts: # docs/contributing/docs-and-blog-components.md # www/src/gatsby-plugin-theme-ui/components.js
# Conflicts: # docs/contributing/docs-and-blog-components.md # www/src/gatsby-plugin-theme-ui/components.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.
I think if this helps unblock internationalization then it's worth getting merged in. The questions on level of granularity and discouraging it from being used seem like they could be answered in the future too (if they become problems) 🤷
I'm not sure personally what issues could be run into doing this, but if it's working for Docusaurus and might work for us I say great!
# Conflicts: # www/package.json
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.
This is looking good! I think this is a good case for using an alias.
@@ -156,77 +156,24 @@ Rendered, the component looks like this: | |||
Connect your Gatsby site to Storage Provider for automatic deployments | |||
</CloudCallout> | |||
|
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 ComponentModel was recently made more flexible, so I think it's worth keeping the documentation for it since we'll be able to use it in more places.
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.
Checked through the places these components are used and everything is looking good!
Description
gatsby-alias-imports
@component
alias pointing towww/src/components
www/gatsby-plugin-theme-ui/components
and instead import them using the new aliascontributing/docs-and-blog-components
.Motivation
See: #20795 (comment)
Open Questions
@site
/@www
alias instead?www
?Related Issues
fixes: #20795
partially fixes: #21470