docs: add comprehensive framework integration guides#49
Conversation
- Add docs directory with framework-specific guides - Create overview README (331 lines) - Add Next.js integration guide (551 lines) - Add Astro integration guide (413 lines) - Add Nuxt integration guide (448 lines) - Add Vite integration guide (529 lines) Total: 2,272 lines of comprehensive documentation Each guide includes: - Prerequisites and installation steps - Basic and advanced configuration - Framework-specific best practices - Deployment instructions - Troubleshooting section - Real-world examples Addresses the lack of detailed framework integration documentation.
|
@HusseinAdeiza is attempting to deploy a commit to the Cytonic Team on Vercel. A member of the Team first needs to authorize it. |
Greptile SummaryThis PR adds a new
Confidence Score: 3/5The guides contain two copy-paste-breaking defects that will cause user confusion or runtime errors before the docs can be considered correct reference material. The Quick Start in README and the detailed Next.js guide advertise incompatible docs/README.md (conflicting API signature in Quick Start) and docs/nuxt.md + docs/vite.md (invalid syntax in basic configuration examples) Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Developer installs aeo.js] --> B{Choose Framework}
B --> C[Next.js\nnext.config.mjs\nwithAeo wrapper]
B --> D[Astro\nastro.config.mjs\naeoAstroIntegration]
B --> E[Nuxt\nnuxt.config.ts\naeo.js/nuxt module]
B --> F[Vite\nvite.config.ts\naeoVitePlugin]
C --> G[npm run build]
D --> G
E --> G
F --> G
G --> H[Generated Output]
H --> I[llms.txt]
H --> J[robots.txt]
H --> K[sitemap.xml]
H --> L[JSON-LD injected into pages]
|
| title: 'My Site', | ||
| description: 'Optimized for AI discovery', | ||
| url: 'https://mysite.com', | ||
| }, | ||
| }); | ||
| ``` | ||
|
|
||
| [→ Full Next.js Guide](./nextjs.md) | ||
|
|
||
| ### Astro | ||
| ```bash | ||
| npm install aeo.js |
There was a problem hiding this comment.
Conflicting
withAeo call signature with nextjs.md
The Quick Start here shows a single-argument form withAeo({ aeo: {...} }), but docs/nextjs.md (lines 797–804 and 1127–1133) consistently shows a two-argument form withAeo(nextConfig, { aeo: {...} }). Only one of these signatures can be correct. A user following the README will pass an object that merges aeo with their next config, while a user following the detailed guide will pass them as separate arguments — one path will silently misconfigure or throw at runtime.
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/README.md
Line: 46-57
Comment:
**Conflicting `withAeo` call signature with `nextjs.md`**
The Quick Start here shows a single-argument form `withAeo({ aeo: {...} })`, but `docs/nextjs.md` (lines 797–804 and 1127–1133) consistently shows a two-argument form `withAeo(nextConfig, { aeo: {...} })`. Only one of these signatures can be correct. A user following the README will pass an object that merges `aeo` with their next config, while a user following the detailed guide will pass them as separate arguments — one path will silently misconfigure or throw at runtime.
How can I resolve this? If you propose a fix, please make it concise.| description?: string; // Site description | ||
| keywords?: string[]; // SEO keywords | ||
| author?: string; // Site author | ||
| language?: string; // Default: 'en' | ||
|
|
||
| // Generation options | ||
| generateLLMsTxt?: boolean; // Default: true | ||
| generateRobotsTxt?: boolean; // Default: true | ||
| generateSitemap?: boolean; // Default: true | ||
| generateJsonLd?: boolean; // Default: true | ||
|
|
||
| // Advanced | ||
| customPages?: PageConfig[]; // Custom page metadata | ||
| excludePaths?: string[]; // Paths to exclude | ||
| includePaths?: string[]; // Specific paths to include | ||
| sitemapPriority?: Record<string, number>; // Per-page priorities | ||
| } | ||
| ``` | ||
|
|
||
| ## Common Use Cases | ||
|
|
||
| ### Blog / Content Site | ||
| Perfect for making your articles discoverable by AI assistants: |
There was a problem hiding this comment.
interface used where team convention requires type
The configuration shape is documented using interface AeoConfig, and the same pattern appears in docs/nextjs.md (interface NextAeoConfig, line 854) and docs/astro.md (interface AstroAeoConfig, line 402). The project's custom rules require type by default for plain data structures that do not use extension or implementation. Showing interface in copy-paste documentation examples will propagate the discouraged pattern to consumers.
Rule Used: Use type by default in TypeScript unless you spe... (source)
Learned From
cytonic-network/ai-frontend#48
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/README.md
Line: 189-211
Comment:
**`interface` used where team convention requires `type`**
The configuration shape is documented using `interface AeoConfig`, and the same pattern appears in `docs/nextjs.md` (`interface NextAeoConfig`, line 854) and `docs/astro.md` (`interface AstroAeoConfig`, line 402). The project's custom rules require `type` by default for plain data structures that do not use extension or implementation. Showing `interface` in copy-paste documentation examples will propagate the discouraged pattern to consumers.
**Rule Used:** Use `type` by default in TypeScript unless you spe... ([source](https://app.greptile.com/review/custom-context?memory=c862f053-5655-4b41-be69-c840e3c9f280))
**Learned From**
[cytonic-network/ai-frontend#48](https://github.com/cytonic-network/ai-frontend/pull/48)
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
This PR adds comprehensive framework integration guides for aeo.js, providing detailed documentation for integrating with Next.js, Astro, Nuxt, and Vite.
What's Added
New
docs/Directory (2,272 lines)What Each Guide Includes
✅ Prerequisites and installation steps
✅ Basic and advanced configuration examples
✅ Framework-specific best practices
✅ Adding structured data (JSON-LD)
✅ Deployment instructions (Vercel, Netlify, self-hosted)
✅ Troubleshooting section
✅ Real-world examples (blogs, e-commerce, documentation sites)
✅ Testing and verification steps
Why This Matters
Currently, the main README only provides minimal configuration snippets (5-10 lines per framework). Developers need:
This documentation fills that gap completely.
Documentation Quality
Impact
This will help developers:
Type of Change
This is the most comprehensive AEO framework documentation available!