gridsome-plugin-robots-txt
Generate a robots.txt for your site.
Last updated a year ago by travisreynolds .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install gridsome-plugin-robots-txt 
SYNC missed versions from official npm registry.

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/"
      }
    ]
  }
}

Current Tags

  • 1.0.2                                ...           latest (a year ago)

3 Versions

  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 6
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |