-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrobots-txt.config.js
31 lines (29 loc) · 1011 Bytes
/
robots-txt.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const NODE_ENV = process.env.NODE_ENV;
const NETLIFY_SITE_URL = process.env.URL || 'https://ladc.dev/';
const NETLIFY_DEPLOY_URL = process.env.DEPLOY_PRIME_URL || NETLIFY_SITE_URL;
const NETLIFY_ENV = process.env.CONTEXT || NODE_ENV;
const isNetlifyProduction = NETLIFY_ENV === 'production';
const siteUrl = isNetlifyProduction ? NETLIFY_SITE_URL : NETLIFY_DEPLOY_URL;
module.exports = {
resolveEnv: () => NETLIFY_ENV,
env: {
production: {
policy: [{ userAgent: '*', disallow: '/form-success' }],
sitemap: `${siteUrl}/sitemap.xml`,
host: siteUrl,
},
'branch-deploy': {
policy: [{ userAgent: '*', disallow: ['/'] }],
sitemap: null,
host: null,
},
'deploy-preview': {
policy: [{ userAgent: '*', disallow: ['/'] }],
sitemap: null,
host: null,
},
development: {
policy: [{ userAgent: '*', disallow: ['/'] }],
},
},
};