Added packages wp, helmet and base config to fetch data with graphql
This commit is contained in:
17
gatsby-config.js
Normal file
17
gatsby-config.js
Normal 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
22
gatsby-node.js
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -6,6 +6,9 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"gatsby": "^1.9.247",
|
"gatsby": "^1.9.247",
|
||||||
"gatsby-link": "^1.6.40",
|
"gatsby-link": "^1.6.40",
|
||||||
|
"gatsby-plugin-react-helmet": "^2.0.10",
|
||||||
|
"gatsby-source-wordpress": "^2.0.93",
|
||||||
|
"react-helmet": "^5.2.0"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"gatsby"
|
"gatsby"
|
||||||
|
|||||||
Reference in New Issue
Block a user