Skip to content

Commit

Permalink
docs: add /robots.txt (#1143)
Browse files Browse the repository at this point in the history
  • Loading branch information
jirfag committed May 18, 2020
1 parent f0c0f06 commit 2c45244
Show file tree
Hide file tree
Showing 3 changed files with 229 additions and 1 deletion.
18 changes: 17 additions & 1 deletion docs/gatsby-config.js
@@ -1,6 +1,7 @@
const withDefault = require(`./src/@rocketseat/gatsby-theme-docs-core/util/with-default`);

const siteUrl = `https://golangci-lint.run`;
const domain = `golangci-lint.run`;
const siteUrl = `https://${domain}`;

const siteConfig = require(`./src/config/site.js`);
const { basePath, configPath, docsPath } = withDefault(siteConfig);
Expand Down Expand Up @@ -112,5 +113,20 @@ module.exports = {
`gatsby-plugin-catch-links`,
`gatsby-plugin-emotion`,
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-plugin-robots-txt`,
options: {
env: {
development: {
host: domain,
policy: [{ userAgent: "*", disallow: ["/"] }],
},
production: {
host: domain,
policy: [{ userAgent: "*", disallow: ["/page-data/"] }],
},
},
},
},
],
};
211 changes: 211 additions & 0 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/package.json
Expand Up @@ -24,6 +24,7 @@
"gatsby-plugin-offline": "^3.0.32",
"gatsby-plugin-react-helmet": "^3.1.16",
"gatsby-plugin-react-svg": "^3.0.0",
"gatsby-plugin-robots-txt": "^1.5.0",
"gatsby-plugin-sharp": "^2.4.0",
"gatsby-plugin-sitemap": "^2.2.26",
"gatsby-remark-autolink-headers": "^2.1.23",
Expand Down

0 comments on commit 2c45244

Please sign in to comment.