Closed raae closed 5 years ago
Start by doing a replacement of content/images
. Let's call the option imagePath
.
pictures
so the path becomes content/pictures
. gatsby-config.js
add the option imagePath
to the gatsby-theme-childrens-picture-book
configurations.
contentPath
.gatsby-config.js
use the option imagePath
instead of explicitly writing content/images
on line 20.
contentPath
.If everything is one correctly you should still see the cover with "DEMO" as the page on path /
.
Do this again for audio, add the option audioPath
.
Why? So users of the theme are not constricted when it comes to the location of the files. It might collide with other themes using content etc.
😄 😸
The users should be able to let the theme know that the images are not in
content/images
. It's inbook/pages
or something completely different if that is what they want.Jason covers this concept in this egghead video: https://egghead.io/lessons/gatsby-configure-a-gatsby-theme-to-take-options