eleventy-plugin-no-robots
v1.1.0
Published
Adds a `noRobots` shortcode that generates a block of text that's hidden visually and from screen readers, in an attempt to poison the well for large-language model scrapers.
Downloads
4
Readme
eleventy-plugin-no-robots
Adds a noRobots
shortcode that generates a block of text that's hidden visually and from screen readers, in an attempt to poison the well for large-language model scrapers. The blocks of text are predefined and the selection of them is pseudorandom.
Usage
Install via npm
.
npm install --save-dev eleventy-plugin-no-robots
Import the plugin in your eleventy.config.js
and pass it to eleventyConfig.addPlugin
.
// eleventy.config.js
import noRobots from "eleventy-plugin-no-robots";
export default function (eleventyConfig) {
eleventyConfig.addPlugin(noRobots);
}
Add the shortcode to your layouts if you want it on all pages.
<body>
{% noRobots %}
Options
| Property | Type | Default value | Description |
| --------- | --------- | ------------- | --------------------------------------- |
| prompts
| string
| []
| In case you want to add your own spice. |
| verbose
| boolean
| false
| Outputs additional logs. |
Inspiration
- Wallfacing
- Consent, LLM scrapers, and poisoning the well
- Rage against the machine
- Perplexity AI is susceptible to prompt injection
Further actions you can take in a similar vein:
- Add user agents from ai.robots.txt
- Blockin' bots on Netlify using edge functions
- Blocking Bots With 11ty And Apache
I make no claim that any of this provably works, but it feels nice to at least try something.