Skip to content

Adds a shortcode to 11ty that generates a block of text hidden visually and from screen readers, in an attempt to poison the well for large-language model scrapers.

Notifications You must be signed in to change notification settings

wkillerud/eleventy-plugin-no-robots

Repository files navigation

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

Further actions you can take in a similar vein:

I make no claim that any of this provably works, but it feels nice to at least try something.

About

Adds a shortcode to 11ty that generates a block of text hidden visually and from screen readers, in an attempt to poison the well for large-language model scrapers.

Topics

Resources

Stars

Watchers

Forks