{"_id":"@awmottaz/eleventy-plugin-block-ai","_rev":"3-f671e85f3f12076ab90743e8c3a45456","name":"@awmottaz/eleventy-plugin-block-ai","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@awmottaz/eleventy-plugin-block-ai","version":"1.0.0","keywords":["eleventy","eleventy-plugin","ai","robots"],"author":{"url":"https://www.tonymottaz.com","name":"Tony Mottaz","email":"mail@tonymottaz.com"},"license":"MIT","_id":"@awmottaz/eleventy-plugin-block-ai@1.0.0","maintainers":[{"name":"awmottaz","email":"mail@tonymottaz.com"}],"bugs":{"url":"https://source.tube/tonymottaz/eleventy-plugin-block-ai/issues"},"11ty":{"compatibility":">=3.0.0"},"dist":{"shasum":"53287f74474be4da5db36c943f7ea68120f7e02a","tarball":"https://registry.npmjs.org/@awmottaz/eleventy-plugin-block-ai/-/eleventy-plugin-block-ai-1.0.0.tgz","fileCount":4,"integrity":"sha512-NdIFCtf/if1PPT0yFIzloOKmEtowxmQuYwc0Qac7xf0nzMt3rhAL/c2Ir1t3ZZq1C2ry5163dL2nuH31lIEV2g==","signatures":[{"sig":"MEUCIQCGjbhgOc9J0OEA+5K3g9Sx0i8CJchDC7nEi16jogmW5QIgcxdFyvdYlifpu8AYWFtiznLS50W+BJ9pX2JwUUF4270=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6160},"main":"index.js","type":"module","gitHead":"49471d4862e9ac3755bce4e96e352318f545a1bd","_npmUser":{"name":"awmottaz","email":"mail@tonymottaz.com"},"repository":{"url":"git+https://source.tube/tonymottaz/eleventy-plugin-block-ai.git","type":"git"},"_npmVersion":"11.6.2","description":"Block AI crawlers on your 11ty site, powered by ai.robots.txt","directories":{},"_nodeVersion":"24.11.1","dependencies":{"@11ty/eleventy-fetch":"5.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/eleventy-plugin-block-ai_1.0.0_1770827857555_0.6052877237669978","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@awmottaz/eleventy-plugin-block-ai","version":"1.0.1","keywords":["eleventy","eleventy-plugin","ai","robots"],"author":{"url":"https://www.tonymottaz.com","name":"Tony Mottaz","email":"mail@tonymottaz.com"},"license":"MIT","_id":"@awmottaz/eleventy-plugin-block-ai@1.0.1","maintainers":[{"name":"awmottaz","email":"mail@tonymottaz.com"}],"bugs":{"url":"https://source.tube/tonymottaz/eleventy-plugin-block-ai/issues"},"11ty":{"compatibility":">=3.0.0"},"dist":{"shasum":"156118b6f3f381e3e1ba444232fe637595346d8f","tarball":"https://registry.npmjs.org/@awmottaz/eleventy-plugin-block-ai/-/eleventy-plugin-block-ai-1.0.1.tgz","fileCount":4,"integrity":"sha512-N/QRk7Se0MHqNGuJGlhp7qZyqeSeDT0xi7Z5Fo/MOKHi351DEGat7dXu6Xy80S71nep/MOItvLEeu8HYcnLUAA==","signatures":[{"sig":"MEYCIQCXebeVsjR8x+Ani49YbDfnuYcHQARk1XHZsEI+KdFvAwIhAPgyjQKFxOqbv57QLsFqFIsQPX/fSRkJtHWW0M9C6E9f","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6177},"main":"index.js","type":"module","gitHead":"c1cdcc37f637d84c0eb680d6d6755353be96825c","_npmUser":{"name":"awmottaz","email":"mail@tonymottaz.com"},"repository":{"url":"git+https://source.tube/tonymottaz/eleventy-plugin-block-ai.git","type":"git"},"_npmVersion":"11.6.2","description":"Block AI crawlers on your 11ty site, powered by ai.robots.txt","directories":{},"_nodeVersion":"24.11.1","dependencies":{"@11ty/eleventy-fetch":"5.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/eleventy-plugin-block-ai_1.0.1_1770829913523_0.9861868796084192","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@awmottaz/eleventy-plugin-block-ai","version":"1.0.2","description":"Block AI crawlers on your 11ty site, powered by ai.robots.txt","type":"module","main":"index.js","author":{"name":"Tony Mottaz","email":"mail@tonymottaz.com","url":"https://www.tonymottaz.com"},"repository":{"type":"git","url":"git+https://source.tube/tonymottaz/eleventy-plugin-block-ai.git"},"bugs":{"url":"https://source.tube/tonymottaz/eleventy-plugin-block-ai/issues"},"publishConfig":{"access":"public"},"keywords":["eleventy","eleventy-plugin","ai","robots"],"license":"MIT","11ty":{"compatibility":">=3.0.0"},"scripts":{"release":"np"},"np":{"tests":false},"dependencies":{"@11ty/eleventy-fetch":"5.1.1"},"devDependencies":{"np":"^11.2.1"},"gitHead":"3daf2d1a1c1c0b4a2d275793bd36c16c91e60cb5","_id":"@awmottaz/eleventy-plugin-block-ai@1.0.2","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-/wrvzNu+apwd9ASnmyke1oR0WCyx+XFGIfC1b8AwdUMvos50yuWL5hAofSJmO0az69Il9pOGychk9h1CsE3P8Q==","shasum":"ee5d1172c450a5de9656d16d4bf9c92a9c05b421","tarball":"https://registry.npmjs.org/@awmottaz/eleventy-plugin-block-ai/-/eleventy-plugin-block-ai-1.0.2.tgz","fileCount":4,"unpackedSize":6300,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBM0CVkgFibYgsx3KMh8EYpruEl0FkCgcJ0sKXIcs8FkAiEA+Ag7rb1tvaYBAhXoZvTHRH+YBBiyTXMJPRrSjO81HYY="}]},"_npmUser":{"name":"awmottaz","email":"mail@tonymottaz.com"},"directories":{},"maintainers":[{"name":"awmottaz","email":"mail@tonymottaz.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/eleventy-plugin-block-ai_1.0.2_1779289204064_0.43488686221641326"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-11T16:37:37.463Z","modified":"2026-05-20T15:00:04.300Z","1.0.0":"2026-02-11T16:37:37.736Z","1.0.1":"2026-02-11T17:11:53.661Z","1.0.2":"2026-05-20T15:00:04.204Z"},"bugs":{"url":"https://source.tube/tonymottaz/eleventy-plugin-block-ai/issues"},"author":{"name":"Tony Mottaz","email":"mail@tonymottaz.com","url":"https://www.tonymottaz.com"},"license":"MIT","keywords":["eleventy","eleventy-plugin","ai","robots"],"repository":{"type":"git","url":"git+https://source.tube/tonymottaz/eleventy-plugin-block-ai.git"},"description":"Block AI crawlers on your 11ty site, powered by ai.robots.txt","maintainers":[{"name":"awmottaz","email":"mail@tonymottaz.com"}],"readme":"# @awmottaz/eleventy-plugin-block-ai\n\nThis plugin uses the data from [ai.robots.txt](https://github.com/ai-robots-txt/ai.robots.txt) to add files to your site that will block AI bots.\n\n## Installation\n\n```sh\nnpm install @awmottaz/eleventy-plugin-block-ai\n```\n\nInternally, this plugin uses [11ty/eleventy-fetch](https://www.11ty.dev/docs/plugins/fetch/) to fetch the ai.robots.txt files. You may want to add the `.cache/` directory to your `.gitignore` file to avoid committing the cached assets.\n\n## Usage\n\nAdd the plugin to your [11ty configuration file](https://www.11ty.dev/docs/config/).\n\n```js\nimport BlockAI from '@awmottaz/eleventy-plugin-block-ai';\n\nexport default async function(eleventyConfig) {\n    eleventyConfig.addPlugin(BlockAI);\n}\n```\n\nBy default, this plugin will create only a `robots.txt` file in your build output. You must explicitly opt in to create other files.\n\n## Configuration\n\nHere is the plugin with default configuration:\n\n```js\nimport BlockAI from '@awmottaz/eleventy-plugin-block-ai';\n\nexport default async function(eleventyConfig) {\n    eleventyConfig.addPlugin(BlockAI, {\n        robots: true,\n        htaccess: false,\n        nginx: false,\n        caddyfile: false,\n        haproxy: false,\n        cacheDuration: '1d',\n    });\n}\n```\n\nThe boolean-valued options control whether the associated file will be generated. It will have the exact contents as provided by the [ai.robots.txt repository](https://github.com/ai-robots-txt/ai.robots.txt) at the prescribed file path.\n\n### Caching\n\nInternally, this plugin uses [11ty/eleventy-fetch](https://www.11ty.dev/docs/plugins/fetch/) to fetch the ai.robots.txt files. You can edit the cache duration using the `cacheDuration` configuration option using the [cache duration configuration syntax](https://www.11ty.dev/docs/plugins/fetch/#change-the-cache-duration).\n\n### Advanced control with the data cascade\n\nIf you need extra control over the generated files, you can disable this plugin from generating them. This plugin will add the raw text contents of each ai.robots.txt file to the global data cascade, so you can create your own files using that.\n\nThe data is namespaced under `ai_robots`:\n\n- `ai_robots.robots`\n- `ai_robots.htaccess`\n- `ai_robots.nginx`\n- `ai_robots.caddyfile`\n- `ai_robots.haproxy`\n\nFor example, if you want to generate a custom `.htaccess` file that includes [404 redirects](https://www.11ty.dev/docs/quicktips/not-found/#htaccess), you could use an [11ty.js template](https://www.11ty.dev/docs/languages/javascript/) like so:\n\n```js\nclass HTAccess {\n\tdata() {\n\t\treturn {\n\t\t\tpermalink: \".htaccess\",\n\t\t};\n\t}\n\n\tasync render(data) {\n\t\treturn `ErrorDocument 404 /404.html\\n\\n${data.ai_robots.htaccess}`;\n\t}\n}\n\nexport default HTAccess;\n```","readmeFilename":"README.md"}