From 50f1381307be699410a603c7d95c911203478291 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 29 Nov 2018 10:59:38 +0100 Subject: [PATCH] pages cleanup, remove /test from sitemap --- gatsby-config.js | 7 ++++- src/pages/setup.js | 57 ---------------------------------------- src/pages/tutorials.js | 59 ------------------------------------------ 3 files changed, 6 insertions(+), 117 deletions(-) delete mode 100644 src/pages/setup.js delete mode 100644 src/pages/tutorials.js diff --git a/gatsby-config.js b/gatsby-config.js index 6464be02..05268c46 100755 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -128,7 +128,12 @@ module.exports = { }, 'gatsby-plugin-catch-links', 'gatsby-plugin-react-helmet', - 'gatsby-plugin-sitemap', + { + resolve: 'gatsby-plugin-sitemap', + options: { + exclude: ['/test/'] + } + }, { resolve: 'gatsby-plugin-manifest', options: { diff --git a/src/pages/setup.js b/src/pages/setup.js deleted file mode 100644 index 8b036448..00000000 --- a/src/pages/setup.js +++ /dev/null @@ -1,57 +0,0 @@ -import React from 'react' -import PropTypes from 'prop-types' -import { Link, graphql } from 'gatsby' -import Layout from '../components/Layout' -import HeaderSection from '../components/HeaderSection' -import Content from '../components/Content' - -const SetupIndexPage = ({ data, location }) => { - const { edges } = data.allMarkdownRemark - - const SetupList = edges.map(({ node }) => { - const { title } = node.frontmatter - const { slug } = node.fields - - return ( -
  • - {title} -
  • - ) - }) - - return ( - - - -
      {SetupList}
    -
    -
    - ) -} - -export default SetupIndexPage - -SetupIndexPage.propTypes = { - data: PropTypes.object.isRequired, - location: PropTypes.object.isRequired -} - -export const indexQuery = graphql` - query { - allMarkdownRemark(filter: { fields: { section: { eq: "setup" } } }) { - edges { - node { - id - html - excerpt(pruneLength: 250) - frontmatter { - title - } - fields { - slug - } - } - } - } - } -` diff --git a/src/pages/tutorials.js b/src/pages/tutorials.js deleted file mode 100644 index 5981d70c..00000000 --- a/src/pages/tutorials.js +++ /dev/null @@ -1,59 +0,0 @@ -import React from 'react' -import PropTypes from 'prop-types' -import { Link, graphql } from 'gatsby' -import Layout from '../components/Layout' -import HeaderSection from '../components/HeaderSection' -import Content from '../components/Content' - -const TutorialsIndexPage = ({ data, location }) => { - const { edges } = data.allMarkdownRemark - - const TutorialsList = edges.map(({ node }) => { - const { title } = node.frontmatter - const { slug } = node.fields - - return ( -
  • - {title} -
  • - ) - }) - - return ( - - - -
      {TutorialsList}
    -
    -
    - ) -} - -export default TutorialsIndexPage - -TutorialsIndexPage.propTypes = { - data: PropTypes.object.isRequired, - location: PropTypes.object.isRequired -} - -export const indexQuery = graphql` - query { - allMarkdownRemark( - filter: { fields: { section: { eq: "tutorials" } } } - ) { - edges { - node { - id - html - excerpt(pruneLength: 250) - frontmatter { - title - } - fields { - slug - } - } - } - } - } -`