This is an Astro integration that allows you to easily add a robots.txt
file to your Astro site.
You need to be using astro@4.0.0
or higher.
Install the integration automatically using the Astro CLI:
pnpm astro add @itsmatteomanf/astro-robots-txt
npx astro add @itsmatteomanf/astro-robots-txt
yarn astro add @itsmatteomanf/astro-robots-txt
Or install it manually:
- Install the required dependencies
pnpm add @itsmatteomanf/astro-robots-txt
npm install @itsmatteomanf/astro-robots-txt
yarn add @itsmatteomanf/astro-robots-txt
- Add the integration to your astro config
+import robotsTxt from "@itsmatteomanf/astro-robots-txt";
export default defineConfig({
integrations: [
+ robotsTxt(),
],
});
TODO
MIT Licensed. Made with ❤️ by Matteo Manfredi.