diff --git a/gatsby-config.js b/gatsby-config.js new file mode 100644 index 0000000..62dfb53 --- /dev/null +++ b/gatsby-config.js @@ -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, + } + } + ], +} diff --git a/gatsby-node.js b/gatsby-node.js new file mode 100644 index 0000000..882a36a --- /dev/null +++ b/gatsby-node.js @@ -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 + } + } + } + } + ` + ) + }) +} diff --git a/package.json b/package.json index b7c939f..411f8a5 100644 --- a/package.json +++ b/package.json @@ -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"