Skip to content

Commit

Permalink
Merge pull request #99 from arcticicestudio/feature/gh-98-gatsby-plug…
Browse files Browse the repository at this point in the history
…in-robots-txt

Gatsby Plugin "robots.txt"
  • Loading branch information
arcticicestudio authored Dec 21, 2018
2 parents 1cf69f4 + 40b50e9 commit ca4ed67
Show file tree
Hide file tree
Showing 4 changed files with 251 additions and 6 deletions.
20 changes: 20 additions & 0 deletions .gatsby/plugins/robots-txt.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright (C) 2018-present Arctic Ice Studio <development@arcticicestudio.com>
* Copyright (C) 2018-present Sven Greb <development@svengreb.de>
*
* Project: Nord Docs
* Repository: https://github.com/arcticicestudio/nord-docs
* License: MIT
*/

/**
* @file The configuration for the Gatsby plugin `gatsby-plugin-robots-txt`.
* @author Arctic Ice Studio <development@arcticicestudio.com>
* @author Sven Greb <development@svengreb.de>
* @see https://github.com/mdreizin/gatsby-plugin-robots-txt
* @since 0.4.0
*/

module.exports = {
policy: [{ userAgent: "*", allow: "/" }]
};
5 changes: 5 additions & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const {
const { BASE_PUBLIC_URL } = require("./src/config/routes/constants");
const gatsbyPluginGoogleGtagConfig = require("./.gatsby/plugins/google/gtag");
const gatsbyPluginManifestConfig = require("./.gatsby/plugins/manifest");
const gatsbyPluginRobotsTxt = require("./.gatsby/plugins/robots-txt");

module.exports = {
siteMetadata: {
Expand Down Expand Up @@ -87,6 +88,10 @@ module.exports = {
resolve: "gatsby-plugin-google-gtag",
options: gatsbyPluginGoogleGtagConfig
},
{
resolve: "gatsby-plugin-robots-txt",
options: gatsbyPluginRobotsTxt
},
/* NOTE: The following plugins rely on the order in this array and must be placed at last in order work properly! */
{
resolve: "gatsby-plugin-manifest",
Expand Down
231 changes: 225 additions & 6 deletions 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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"gatsby-plugin-offline": "2.0.20",
"gatsby-plugin-react-helmet": "3.0.2",
"gatsby-plugin-remove-trailing-slashes": "2.0.5",
"gatsby-plugin-robots-txt": "1.3.0",
"gatsby-plugin-sitemap": "2.0.3",
"gatsby-plugin-styled-components": "3.0.4",
"gatsby-plugin-svgr": "2.0.1",
Expand Down

0 comments on commit ca4ed67

Please sign in to comment.