text: const path = require('path');
  
  exports.createLayouts = ({ graphql, boundActionCreators }) => {
   boundActionCreators.createLayout({
     component: path.resolve(`src/layouts/index.js`),
    })
   }
  
  exports.createPages = ({ boundActionCreators, graphql }) => {
    const { createPage } = boundActionCreators;
  
    return graphql(`
      {
        allMarkdownRemark(
          sort: { order: DESC, fields: [frontmatter___date] },
          limit: 1000,
          filter:{frontmatter:{pageless:{ne:true}}}
        ) {
          edges {
            node {
              excerpt(pruneLength: 400)
              html
              id
              frontmatter {
                templateKey
                path
                date
                title
                description
              }
            }
          }
        }
      }
    `).then(result => {
      if (result.errors) {
        result.errors.forEach(e => console.error(e.toString()));
        return Promise.reject(result.errors);
      }
      result.data.allMarkdownRemark.edges.forEach(({ node }) => {
        createPage({
          path: node.frontmatter.path,
          component: path.resolve(`src/templates/${String(node.frontmatter.templateKey)}.js`),
          context: {} // additional data can be passed via context
        });
      });
    });
  };
  