From abc8a10ed20df76bc9d3726eb5081f73c2115d58 Mon Sep 17 00:00:00 2001 From: = Date: Fri, 25 Jan 2019 05:07:49 -0800 Subject: [PATCH] Remove Moris and Wordpress --- gatsby-config.js | 2 +- gatsby-node.js | 76 ++++++++++++------------- src/components/SEO.js | 1 - src/pages/about.js | 3 - src/pages/index.js | 102 +++++++++++----------------------- src/templates/blog.js | 61 ++++++++++---------- src/templates/post-default.js | 32 +++++------ 7 files changed, 117 insertions(+), 160 deletions(-) diff --git a/gatsby-config.js b/gatsby-config.js index 8a60f09..de68494 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -10,7 +10,7 @@ module.exports = { { resolve: 'gatsby-source-wordpress', options: { - baseUrl: 'swp.sarajevo.net', + baseUrl: 'saburly.wordpress.com', protocol: 'https', hostingWPCOM: false, useACF: true, diff --git a/gatsby-node.js b/gatsby-node.js index 8c1300b..f80d8b0 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -1,43 +1,43 @@ const path = require('path') -exports.createPages = ({ graphql, boundActionCreators }) => { - const { createPage } = boundActionCreators - return new Promise((resolve, reject) => { - graphql( - ` - { - allWordpressPost { - edges { - node { - slug - status - } - } - } - } - ` - ).then(result => { - if (result.errors) { - console.log(result.errors) - reject(result.errors) - } +//exports.createPages = ({ graphql, boundActionCreators }) => { + //const { createPage } = boundActionCreators + //return new Promise((resolve, reject) => { + //graphql( + //` + //{ + //allWordpressPost { + //edges { + //node { + //slug + //status + //} + //} + //} + //} + //` + //).then(result => { + //if (result.errors) { + //console.log(result.errors) + //reject(result.errors) + //} - createPage({ - path: `/blog/`, - component: path.resolve('./src/templates/blog.js'), - }) + //createPage({ + //path: `/blog/`, + //component: path.resolve('./src/templates/blog.js'), + //}) - result.data.allWordpressPost.edges.forEach(({ node }) => { - createPage({ - path: `blog/${node.slug}`, - component: path.resolve('./src/templates/post-default.js'), - context: { - slug: node.slug, - }, - }) - }) + //result.data.allWordpressPost.edges.forEach(({ node }) => { + //createPage({ + //path: `blog/${node.slug}`, + //component: path.resolve('./src/templates/post-default.js'), + //context: { + //slug: node.slug, + //}, + //}) + //}) - resolve() - }) - }) -} + //resolve() + //}) + //}) +//} diff --git a/src/components/SEO.js b/src/components/SEO.js index 45146e2..47943bc 100644 --- a/src/components/SEO.js +++ b/src/components/SEO.js @@ -69,7 +69,6 @@ class SEO extends Component { return ( - {title} diff --git a/src/pages/about.js b/src/pages/about.js index 84af22e..1d628e2 100644 --- a/src/pages/about.js +++ b/src/pages/about.js @@ -63,9 +63,6 @@ const AboutPage = () => ( textClasses="text-center" />
-
- -
diff --git a/src/pages/index.js b/src/pages/index.js index 41b4e11..97bd2e5 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -102,7 +102,7 @@ const IndexPage = ({ ...props }) => ( /> -
+
(
- -
- -
- {props.data.allWordpressPost.edges.map(({ node }) => ( -
- - - -
- ))} -
-
) -export const query = graphql` - query indexPostsQuery { - allWordpressPost(limit: 2) { - edges { - node { - id - title - author { - id - name - } - excerpt - status - slug - date(formatString: "MMMM DD, YYYY") - featured_media { - localFile { - childImageSharp { - resolutions(width: 700, height: 300) { - src - width - height - } - } - } - } - } - } - } - } -` +//export const query = graphql` + //query indexPostsQuery { + //allWordpressPost(limit: 2) { + //edges { + //node { + //id + //title + //author { + //id + //name + //} + //excerpt + //status + //slug + //date(formatString: "MMMM DD, YYYY") + //featured_media { + //localFile { + //childImageSharp { + //resolutions(width: 700, height: 300) { + //src + //width + //height + //} + //} + //} + //} + //} + //} + //} + //} +//` export default IndexPage diff --git a/src/templates/blog.js b/src/templates/blog.js index e7d34d7..b356e2d 100644 --- a/src/templates/blog.js +++ b/src/templates/blog.js @@ -20,7 +20,6 @@ class Blog extends Component { siteUrl="https://saburly.com/blog" /> -