-
Notifications
You must be signed in to change notification settings - Fork 31
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
Set up Gatsby #157
Set up Gatsby #157
Conversation
This comment has been minimized.
This comment has been minimized.
This pull request is automatically deployed with Now. Latest deployment for this branch: https://primer-style-git-use-gatsby.primer.now.sh |
The spacing is slightly different in some places.. for example on the home page some margin is missing for "Keep in touch": It also seems that there is a slight difference in colors for SVGs? The blue in the header graphic is blue a bit lighter? Maybe it's because the SVGs get optimized and it reduces the color pallete? Anyways, no real blocker. |
@shawnbot I think this is a sensible first ship, I did a quick scan over the site and didn't see any issues. Probably good to get a more thorough code review before shipping though! |
The open source/keep in touch section is likely to stay for a while as you're only working on release 1 and part of 2. So I think it's worth correcting the spacing, should be a quick fix. |
Regarding switching to yarn to deal with the |
@emplums I absolutely agree! We can ditch Yarn as soon as we're able to replace the Blueprints header with the one from Doctocat. |
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.
Looks good to me 🚢
Fix spacing issues w/new Primer Components
This changed in primer/primer.style#157.
👀 Preview
There's a lot going on in this PR to switch over from Next to Gatsby. Notably:
We're deploying with the Now GitHub integration and using v2 with the same build configuration as Doctocat. The big win here is getting to specify
routes
innow.json
so that every deployment can test sub-site URLs (/css/utilities
,/components
, etc.). 🤘Our custom babel config is gone. 🔥
We've switched to using Yarn instead of npm so that we can leverage selective version resolutions to force☹️
@primer/blueprints
and@primer/components
to use the version of React that we want. This appears to be the only way to prevent multiple versions ofreact-dom
from being bundled, which breaks the app.(Huge props to @colebemis for pointing me to the solution here!)
There is now a contributing.md describing (for now) just the development workflow. 📝
Many of the social card and SEO-related files are currently ignored; I'll file a separate issue to get them all working with gatsby-plugin-manifest. 📦
Upgrading
@svgr/webpack
for use with gatsby-plugin-svgr meant having to rewrite all of the imports and add an SVGO config that disables removal of theviewBox
attribute, which is required to preserve aspect ratios. So:All of our data — team content, releases, and "news" items — now lives in
src/data/
.@emplums I wasn't able to figure out how to make the
@primer/blueprints
' Header component not prefix links withhttps://primer.style
. Any ideas there?