Skip to content

Commit

Permalink
Merge pull request #77 from newrelic/zstickles/robots-txt
Browse files Browse the repository at this point in the history
Added a robots.txt plugin
zstix authored May 30, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents f64d5f9 + c0d893a commit 316019a
Showing 3 changed files with 317 additions and 26 deletions.
59 changes: 35 additions & 24 deletions gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,48 +1,49 @@
module.exports = {
siteMetadata: {
title: `New Relic Developers`,
description: `Do more on our platform and make New Relic your own with APIs, SDKs, code snippets, tutorials, and more developer tools.`,
author: `New Relic`,
title: 'New Relic Developers',
description:
'Do more on our platform and make New Relic your own with APIs, SDKs, code snippets, tutorials, and more developer tools.',
author: 'New Relic',
},
plugins: [
`gatsby-plugin-react-helmet`,
'gatsby-plugin-react-helmet',
{
resolve: `gatsby-source-filesystem`,
resolve: 'gatsby-source-filesystem',
options: {
name: `images`,
name: 'images',
path: `${__dirname}/src/images`,
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
`gatsby-plugin-sass`,
'gatsby-transformer-sharp',
'gatsby-plugin-sharp',
'gatsby-plugin-sass',
{
resolve: `gatsby-plugin-manifest`,
resolve: 'gatsby-plugin-manifest',
options: {
name: `gatsby-starter-default`,
short_name: `starter`,
start_url: `/`,
background_color: `#663399`,
theme_color: `#663399`,
display: `minimal-ui`,
icon: `src/images/gatsby-icon.png`, // This path is relative to the root of the site.
name: 'gatsby-starter-default',
short_name: 'starter',
start_url: '/',
background_color: '#663399',
theme_color: '#663399',
display: 'minimal-ui',
icon: 'src/images/gatsby-icon.png', // This path is relative to the root of the site.
},
},
{
resolve: `gatsby-source-filesystem`,
resolve: 'gatsby-source-filesystem',
options: {
name: `markdown-pages`,
name: 'markdown-pages',
path: `${__dirname}/src/markdown-pages`,
},
},
`gatsby-remark-images`,
`gatsby-transformer-remark`,
'gatsby-remark-images',
'gatsby-transformer-remark',
{
resolve: `gatsby-plugin-mdx`,
resolve: 'gatsby-plugin-mdx',
options: {
gatsbyRemarkPlugins: [
{
resolve: `gatsby-remark-images`,
resolve: 'gatsby-remark-images',
options: {
maxWidth: 1200,
},
@@ -51,11 +52,21 @@ module.exports = {
},
},
{
resolve: `gatsby-plugin-google-tagmanager`,
resolve: 'gatsby-plugin-google-tagmanager',
options: {
id: 'GTM-W77XWWH',
includeInDevelopment: true,
},
},
{
resolve: 'gatsby-plugin-robots-txt',
options: {
host: 'https://developer.newrelic.com',
sitemap: 'https://developer.newrelic.com/sitemap.xml',
// NOTE: policy.disallow can take an array of pages or
// directories for web crawlers to ignore.
policy: [{ userAgent: '*', allow: '/' }],
},
},
],
};
283 changes: 281 additions & 2 deletions package-lock.json
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
"gatsby-plugin-mdx": "^1.2.11",
"gatsby-plugin-offline": "^3.1.4",
"gatsby-plugin-react-helmet": "^3.2.4",
"gatsby-plugin-robots-txt": "^1.5.1",
"gatsby-plugin-sass": "^2.2.3",
"gatsby-plugin-sharp": "^2.5.6",
"gatsby-remark-images": "^3.3.8",

0 comments on commit 316019a

Please sign in to comment.