🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

gridsome-plugin-robots-txt

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gridsome-plugin-robots-txt

Generate a robots.txt for your site.

1.0.2
latest
Source
npm
Version published
Weekly downloads
290
-83.49%
Maintainers
1
Weekly downloads
 
Created
Source

gridsome-plugin-robots-txt

Generate a robots.txt for your site

Installation

yarn add gridsome-plugin-robots-txt

Usage

gridsome.config.js

module.exports = {
  siteName: 'Gridsome',
  siteUrl: 'https://my-awesome-fast-site.com',
  plugins: [
    'gridsome-plugin-robots-txt'
  ]
}

Configuration

The default config options will take siteUrl as host, and assume a sitemap is hosted at ${siteUrl}/sitemap.xml. You can change these options, as well as adding policies:

{
  use: 'gridsome-plugin-robots-txt',
  options: {
    host: 'https://my-awesome-fast-site.com',
    sitemap: 'https://my-awesome-fast-site.com/configs/sitemap.xml',
    policy: [
      {
        userAgent: "Googlebot",
        allow: "/",
        disallow: "/search",
        crawlDelay: 2
      },
      {
        userAgent: "*",
        allow: "/",
        disallow: "/search",
        crawlDelay: 10,
        cleanParam: "ref /articles/"
      }
    ]
  }
}

Keywords

gridsome

FAQs

Package last updated on 14 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts