Skip to content
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

Update nav links #162

Merged
merged 21 commits into from
Aug 1, 2019
Merged

Update nav links #162

merged 21 commits into from
Aug 1, 2019

Conversation

shawnbot
Copy link
Contributor

This replaces the nav from Blueprints with a custom one that we'll eventually replace again with the one that lives in Doctocat, and implements the nav updates listed in #152

/cc @colebemis

@vercel
Copy link

vercel bot commented Jul 31, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://primer-style-git-nav-update.primer.now.sh

@shawnbot
Copy link
Contributor Author

shawnbot commented Aug 1, 2019

Gatsby redirects are weird. I think that both the to and from URLs are expanded to "paths", because redirecting from /team to /about#team actually takes you to /about/#team/. Not sure what to do there 🤔

icon: require.resolve('./src/icons/favicon-192.png')
}
}
'gatsby-plugin-meta-redirect'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the docs, this needs to go last.

import Team from '../components/Team'
import Layout from '../components/Layout'

<div id="team/">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a workaround for Gatsby's appending of / to redirect destination paths. Even though we specify /about/#team as the toPath, it treats the whole thing as a "path" and appends it at the end of the string, producing /about/#team/ — which "works" if we provide an anchor with id="team/" (including the slash). 🤷‍♀

@shawnbot shawnbot marked this pull request as ready for review August 1, 2019 21:18
@shawnbot shawnbot merged commit 95ac067 into homepage-layout Aug 1, 2019
@shawnbot shawnbot deleted the nav-update branch August 1, 2019 21:36
@shawnbot shawnbot mentioned this pull request Aug 1, 2019
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant