nehalist / gatsby-theme-nehalem

A Gatsby blog theme.
https://nehalem.netlify.com/
168 stars 60 forks source link

Allow disabling default pages generation #5

Closed beerose closed 5 years ago

beerose commented 5 years ago

Hi! I'm creating my blog using your theme, and it's really cool! However, I've found one bug 😉Here's the fix.


In this PR I added the possibility to pass falsy values for loadDefaultPages. Previously line 2 in gatsby-config.js didn't work and accepted only truthy values, thus it wasn't possible to disable default pages generation.

I changed it to:

const loadDefaultPages = themeOptions.loadDefaultPages !== undefined ? themeOptions.loadDefaultPages : true;

And I also filtered the plugins list for truthy values.

nehalist commented 5 years ago

Hey, thanks a lot for your PR! I'll take a look at it on the weekend!

nehalist commented 5 years ago

Looks fine, thanks a lot!