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

How to create separate page #5

Open
aosante opened this issue May 25, 2020 · 1 comment
Open

How to create separate page #5

aosante opened this issue May 25, 2020 · 1 comment

Comments

@aosante
Copy link

aosante commented May 25, 2020

Currently, all the navigation menu items take you to a different section of the same landing page. What would be the best approach to create a new page that reuses navbar and footer? I was thinking about making a second call to the createPage function inside the exports.createPages function in the gatsby-node.js file. Giving it of course, the corresponding path, component, and context properties.

@thundermiracle
Copy link
Owner

I was thinking about making a second call to the createPage function inside the exports.createPages

I think your solution is right. Some customizations are better than embedding everything for configurable options. It’s far more maintainable.

So my solution is passing extra customized menu to Navbar or footer as props.

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

No branches or pull requests

2 participants