Configure settings at gatsby-config.js
, for example:
module.exports = {
plugins: [
{
resolve: `@dotdev/gatsby-source-navigation`,
options: {
appConfig: {
apiKey: "api-key",
authDomain: "project-id.firebaseapp.com",
databaseURL: "https://project-id.firebaseio.com",
projectId: "project-id",
storageBucket: "project-id.appspot.com",
messagingSenderId: "sender-id",
appID: "app-id",
},
types: [
{
type: "Navigation",
collection: "navigation",
map: doc => ({
active: doc.active,
type: doc.type,
items: doc.items,
}),
},
],
},
},
],
}
Note that you will need to have navigation
in Firestore matching
this schema before Gatsby can query correctly.