panr / gatsby-starter-hello-friend

Pretty basic starter for Gatsby that covers all of the essentials. All you have to do is start typing!
MIT License
165 stars 71 forks source link

Can't change paths of pages in menu, or generate new #18

Closed averyfreeman closed 4 years ago

averyfreeman commented 4 years ago

Hi

I'm not sure what I'm doing wrong, but I can't seem to add additional menu options in gatsby-config.js

I added:

{
        title: 'Design',
        path: '/design',
      },

with corresponding design.md in /src/pages

But it doesn't recognize it or create page-data.json in /public/page-data/design

Am I missing something? Thanks

panr commented 4 years ago

Did you set correct path in design.md frontmatter, like path: "/design"?

Btw. I spotted some serious issue with React Helmet and I need to fix it soon. Don't know if this is related. The bug with RH appears when you click on Show more menu, then everything crushes...

averyfreeman commented 4 years ago

Thank you so much! That did it. I thought I had checked that already, but I was mistaken.

Sorry I'm asked such a simple question in your bug repo. I will post questions to Stack Overflow from now on.

I used it as an opportunity to learn a little more about command line:

history -w /dev/stdout
cd gatsby-starter-hello-friend/src/pages/
sed -i 's/showcase/design/g' design.md 
sed -i 's/Showcase/Design/g' design.md 
cd ../../ && gatsby develop

Works properly, and now I have a much better idea of what to look for re: new pages.

I have a question about your gatsby-node.js but I will ask in a separate issue for organization