Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nuxt-robots-module

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-robots-module

A NuxtJS module thats inject a middleware to generate a robots.txt file

  • 1.5.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

nuxt-robots-module

npm (scoped with tag) CircleCI npm js-standard-style

A NuxtJS module thats inject a middleware to generate a robots.txt file

Table of Contents

Requirements

  • npm or yarn
  • NuxtJS
  • NodeJS

Install

$ npm install --save nuxt-robots-module
// or
$ yarn add nuxt-robots-module

Getting Started

Add nuxt-robots-module to modules section of nuxt.config.js.

{
  modules: [
    // Simple usage
    'nuxt-robots-module',

    // With options
    ['nuxt-robots-module', {
      /* module options */
      UserAgent: 'Googlebot',
      Disallow: '/',
    }],
 ]
}

or even

{
  modules: [
    'nuxt-robots-module',
  ],
  robots: {
    /* module options */
    UserAgent: '*',
    Disallow: '/',
  },
}

Options

The module option parameter can be an object (like above) or an array of objects.

{
  modules: [
    'nuxt-robots-module',
  ],
  robots: [
    {
      UserAgent: 'Googlebot',
      Disallow: '/users',
    },
    {
      UserAgent: 'Bingbot',
      Disallow: '/admin',
    },
  ],
}

Will generate a /robots.txt

UserAgent: Googlebot
Disallow: /users
UserAgent: Bingbot
Disallow: /admin

Development

To run the development server, you can either install the dependencies locally by running:

npm install

or using Docker with docker-compose:

docker-compose up -d

This will run the a dev example through the 3000 port on localhost. You can then see your generated robots.txt in localhost:3000/robots.txt.

License

Robots.txt generate code from https://github.com/weo-edu/express-robots repository. Project generated with Nuxt module builder.

MIT License

FAQs

Package last updated on 22 Feb 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc