vuepress-plugin-robots

Robots.txt file generator plugin for vuepress
15,546 9
Install
npm install vuepress-plugin-robots
Latest Version:1.0.1
License:MIT
Last Updated:Oct 28, 2020
Links: GitHub  ·  npm
Maintainer: hiyue

Robots.txt file plugin for Vuepress

Install

  • NPM
npm install vuepress-plugin-robots

Usage

Vuepress v0.x

NOT SUPPORT

Vuepress v1.x

Put your options in .vuepress/config.js file, please note: host option is mandatory.

// .vuepress/config.js

module.exports = {
  plugins: {
    'robots': {
        /**
         * @host
         * Mandatory, You have to provide the host URL
         */   
        host: "https://your-website",
        /**
         * @disallowAll
         * Optional: if it's true, all others options are ignored and exclude all robots from the entire server
         */
        disallowAll: false,
        /**
         * @allowAll
         * Optional: if it's true and @disallowAll is false, all others options are ignored and allow all robots complete access
         */
        allowAll: true,      
        /**
         * @sitemap
         * Optional, by default: sitemap.xml
         */ 
        sitemap: "/sitemap.xml",
        /**
         * @policies
         * Optional, by default: null
         */ 
        policies: [
            {
                userAgent: '*',
                disallow: [
                    '/admin','/login'
                ],
                allow: [    // Optional: Allowed paths. 
                    'products','blog'
                ]
            }
        ]
    },
  }
}

Thanks

Thanks to generate-robotstxt

Changelog

License

MIT

Related Packages

vuepress-plugin-code-enhance

A plugin for adding full-screen and copy button to your code blocks in VuePress...

584 370
@vuepress/plugin-theme-data

VuePress plugin - theme data

1,355,751 2,833
@vuepress/plugin-external-link-icon

VuePress plugin - external link icon

308,812 2,833
@vuepress/plugin-redirect

VuePress plugin - redirect

178,337 62
@vuepress/plugin-copyright

VuePress plugin - copyright

169,707 62

Version History

Version Released License
1.0.1 MIT
1.0.0 MIT