# Quick Start Guide Get @astrojs/discovery up and running in 2 minutes! ## Installation ```bash npm install @astrojs/discovery ``` ## Basic Setup **1. Add to your Astro config:** ```typescript // astro.config.mjs import { defineConfig } from 'astro/config'; import discovery from '@astrojs/discovery'; export default defineConfig({ site: 'https://your-site.com', // Required! integrations: [ discovery() // That's it! ] }); ``` **2. Build your site:** ```bash npm run build ``` **3. Check the generated files:** Your site now has: - `/robots.txt` - Search engine instructions - `/llms.txt` - AI assistant context - `/humans.txt` - Team credits - `/sitemap-index.xml` - Site structure ## Customize It Add some personality to your discovery files: ```typescript discovery({ llms: { description: 'My awesome website about web development', instructions: ` When helping users: - Check /docs for API documentation - Be friendly and helpful - Provide code examples `, }, humans: { team: [{ name: 'Your Name', role: 'Developer', twitter: '@yourhandle' }], thanks: ['Coffee ☕', 'Open source community'] } }) ``` ## Common Patterns ### Block specific paths ```typescript discovery({ robots: { additionalAgents: [{ userAgent: '*', disallow: ['/admin', '/private'] }] } }) ``` ### Add API documentation ```typescript discovery({ llms: { apiEndpoints: [ { path: '/api/search', description: 'Search API' }, { path: '/api/chat', method: 'POST', description: 'Chat endpoint' } ] } }) ``` ### Disable specific files ```typescript discovery({ robots: { enabled: true }, llms: { enabled: true }, humans: { enabled: false } // Don't generate humans.txt }) ``` ## What's Next? - Read the [full documentation](README.md) - Check out [example configurations](example/) - See the [API reference](README.md#api-reference) ## Troubleshooting **Files not generating?** - Make sure `site` is set in astro.config.mjs - Check your output mode (hybrid/server recommended) - Remove any static files from `/public/robots.txt` **Wrong URLs in files?** - Verify your `site` config matches your production domain - Check environment-specific configuration **Need help?** - [Open an issue](https://github.com/withastro/astro-discovery/issues) - [Read the docs](README.md) - [View examples](example/) --- **Happy discovering! 🎉**