Added packages wp, helmet and base config to fetch data with graphql

This commit is contained in:
Moris Zen
2018-06-25 09:19:20 +02:00
parent a25a63e200
commit 57f717fec0
3 changed files with 42 additions and 0 deletions

17
gatsby-config.js Normal file
View File

@@ -0,0 +1,17 @@
module.exports = {
siteMetadata: {
title: 'Saburly',
},
plugins: [
'gatsby-plugin-react-helmet',
{
resolve: 'gatsby-source-wordpress',
options: {
baseUrl: 'swp.sarajevo.net',
protocol: 'https',
hostingWPCOM: false,
useACF: true,
}
}
],
}

22
gatsby-node.js Normal file
View File

@@ -0,0 +1,22 @@
const path = require('path')
exports.createPages = ({ graphql, boundActionCreators }) => {
const { createPage } = boundActionCreators
return new Promise((resolve, reject) => {
graphql(
`
{
allWordpressPage {
edges {
node {
id
slug
title
}
}
}
}
`
)
})
}

View File

@@ -6,6 +6,9 @@
"dependencies": {
"gatsby": "^1.9.247",
"gatsby-link": "^1.6.40",
"gatsby-plugin-react-helmet": "^2.0.10",
"gatsby-source-wordpress": "^2.0.93",
"react-helmet": "^5.2.0"
},
"keywords": [
"gatsby"