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

Fix component nav links #910

Merged
merged 1 commit into from
Jan 15, 2025
Merged

Fix component nav links #910

merged 1 commit into from
Jan 15, 2025

Conversation

camertron
Copy link
Contributor

For whatever unexpected (read: stupid) reason, the sitePage data Gatsby returns during build is not the same data it returns in dev. Specifically, data.sitePage.path is eg components/link in dev but /* during build, which completely messes up nav URL construction. This PR parses the page slug from data.sitePage.id instead. This is pretty hacky, but there doesn't appear to be a better way.

@camertron camertron requested a review from a team as a code owner January 15, 2025 21:51
@camertron camertron merged commit e1ef5ff into main Jan 15, 2025
6 checks passed
@camertron camertron deleted the fix_nav_links branch January 15, 2025 22:14
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