feat: sitemap and robots txt
This commit is contained in:
@@ -1,8 +1,18 @@
|
||||
const path = require("path");
|
||||
const { GMAPS_APIKEY } = process.env;
|
||||
|
||||
const {
|
||||
NODE_ENV,
|
||||
URL: NETLIFY_SITE_URL = `https://abcprojectdesign.com`,
|
||||
DEPLOY_PRIME_URL: NETLIFY_DEPLOY_URL = NETLIFY_SITE_URL,
|
||||
CONTEXT: NETLIFY_ENV = NODE_ENV
|
||||
} = process.env;
|
||||
const isNetlifyProduction = NETLIFY_ENV === "production";
|
||||
const siteUrl = isNetlifyProduction ? NETLIFY_SITE_URL : NETLIFY_DEPLOY_URL;
|
||||
|
||||
module.exports = {
|
||||
siteMetadata: {
|
||||
siteUrl,
|
||||
title: `ABC Project Design`,
|
||||
description: `Easy as ABC`,
|
||||
keywords: `Bathroom Tiling Fitting Installation London Essex Suffolk Hertfordshire`,
|
||||
@@ -54,6 +64,27 @@ module.exports = {
|
||||
display: `standalone`
|
||||
}
|
||||
},
|
||||
{
|
||||
resolve: `gatsby-plugin-robots-txt`,
|
||||
options: {
|
||||
resolveEnv: () => NETLIFY_ENV,
|
||||
env: {
|
||||
production: {
|
||||
policy: [{ userAgent: `*` }]
|
||||
},
|
||||
"branch-deploy": {
|
||||
policy: [{ userAgent: `*`, disallow: [`/`] }],
|
||||
sitemap: null,
|
||||
host: null
|
||||
},
|
||||
"deploy-preview": {
|
||||
policy: [{ userAgent: `*`, disallow: [`/`] }],
|
||||
sitemap: null,
|
||||
host: null
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
resolve: `gatsby-source-filesystem`,
|
||||
options: {
|
||||
@@ -69,6 +100,7 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
},
|
||||
`gatsby-plugin-sitemap`,
|
||||
`gatsby-plugin-react-helmet`,
|
||||
`gatsby-transformer-sharp`,
|
||||
`gatsby-plugin-sharp`,
|
||||
|
||||
Reference in New Issue
Block a user