mirror of
https://github.com/LukeHagar/unicorn-utterances.git
synced 2025-12-09 21:07:49 +00:00
Add environment dependent robots.txt file using plugin, add sitemap to file
This commit is contained in:
@@ -285,7 +285,25 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
},
|
||||
`gatsby-plugin-sitemap`
|
||||
`gatsby-plugin-sitemap`,
|
||||
{
|
||||
resolve: 'gatsby-plugin-robots-txt',
|
||||
options: {
|
||||
resolveEnv: () => process.env.GITHUB_REF,
|
||||
env: {
|
||||
"refs/heads/integration": {
|
||||
host: 'https://beta.unicorn-utterances.com/sitemap.xml',
|
||||
sitemap: 'https://beta.unicorn-utterances.com/sitemap.xml',
|
||||
policy: [{userAgent: '*', disallow: ['/']}]
|
||||
},
|
||||
"refs/heads/master": {
|
||||
host: 'https://unicorn-utterances.com/sitemap.xml',
|
||||
sitemap: 'https://unicorn-utterances.com/sitemap.xml',
|
||||
policy: [{userAgent: '*', allow: '/'}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
mapping: {
|
||||
"MarkdownRemark.frontmatter.authors": `UnicornsJson`,
|
||||
|
||||
Reference in New Issue
Block a user