https://github.com/itgalaxy/robotstxt-webpack-plugin
A webpack plugin to generate a robots.txt file
https://github.com/itgalaxy/robotstxt-webpack-plugin
robots-txt robotstxt webpack webpack-plugin
Last synced: about 2 months ago
JSON representation
A webpack plugin to generate a robots.txt file
- Host: GitHub
- URL: https://github.com/itgalaxy/robotstxt-webpack-plugin
- Owner: itgalaxy
- License: mit
- Created: 2016-11-10T16:44:24.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-03-15T04:52:37.000Z (over 2 years ago)
- Last Synced: 2025-04-26T06:23:23.490Z (2 months ago)
- Topics: robots-txt, robotstxt, webpack, webpack-plugin
- Language: JavaScript
- Homepage:
- Size: 784 KB
- Stars: 35
- Watchers: 5
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.npmjs.org/package/robotstxt-webpack-plugin)
[](https://travis-ci.org/itgalaxy/robotstxt-webpack-plugin)
[](https://david-dm.org/itgalaxy/robotstxt-webpack-plugin)
[](https://david-dm.org/itgalaxy/robotstxt-webpack-plugin?type=dev)# robotstxt-webpack-plugin
Generating `robots.txt` using webpack.
Why your need [robots.txt](https://support.google.com/webmasters/answer/6062608?hl=en)?
Webpack plugin for [generate-robotstxt](https://github.com/itgalaxy/generate-robotstxt/) package.
## Getting Started
To begin, you'll need to install `robotstxt-webpack-plugin`:
```console
npm install --save-dev robotstxt-webpack-plugin
```**webpack.config.js**
```js
const RobotstxtPlugin = require("robotstxt-webpack-plugin");const options = {}; // see options below
module.exports = {
plugins: [new RobotstxtPlugin(options)],
};
```## Options
- `filePath` - (optional) path for robots.txt (should be contain full path include `robots.txt` file name, example - `path/to/robots.txt`).
- `General options` - see [generate-robotstxt](https://github.com/itgalaxy/generate-robotstxt) options.## Related
- [generate-robotstxt](https://github.com/itgalaxy/generate-robotstxt) - api for this package.
## Contribution
Feel free to push your code if you agree with publishing under the MIT license.
## Changelog
[MIT](./CHANGELOG.md)
## License
[MIT](./LICENSE)