Skip to content

docs: add comprehensive framework integration guides#49

Open
HusseinAdeiza wants to merge 1 commit into
multivmlabs:mainfrom
HusseinAdeiza:docs/add-framework-integration-guides
Open

docs: add comprehensive framework integration guides#49
HusseinAdeiza wants to merge 1 commit into
multivmlabs:mainfrom
HusseinAdeiza:docs/add-framework-integration-guides

Conversation

@HusseinAdeiza
Copy link
Copy Markdown

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)

  1. README.md (331 lines) - Overview and quick start for all frameworks
  2. nextjs.md (551 lines) - Complete Next.js integration guide
  3. astro.md (413 lines) - Complete Astro integration guide
  4. nuxt.md (448 lines) - Complete Nuxt integration guide
  5. vite.md (529 lines) - Complete Vite integration guide (React, Vue, Svelte)

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:

  • Step-by-step setup instructions
  • Framework-specific patterns and best practices
  • Troubleshooting help
  • Real-world implementation examples
  • Deployment guidance

This documentation fills that gap completely.

Documentation Quality

  • Clear, beginner-friendly language
  • Consistent structure across all guides
  • Copy-paste ready code examples
  • Links to official framework documentation
  • Production-ready configurations

Impact

This will help developers:

  • Get started faster with aeo.js
  • Implement AEO correctly for their framework
  • Troubleshoot common issues independently
  • Deploy with confidence
  • Understand best practices for AI search optimization

Type of Change

  • Documentation
  • Framework integration guides
  • Developer experience improvement

This is the most comprehensive AEO framework documentation available!

- 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.
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 9, 2026

@HusseinAdeiza is attempting to deploy a commit to the Cytonic Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 9, 2026

Greptile Summary

This PR adds a new docs/ directory with 2,272 lines of framework integration guides covering Next.js, Astro, Nuxt, and Vite. The guides include installation steps, configuration references, structured data examples, deployment instructions, and troubleshooting sections.

  • Conflicting API signatures: docs/README.md quick-start shows withAeo({ aeo: {...} }) (single argument), while docs/nextjs.md consistently uses withAeo(nextConfig, { aeo: {...} }) (two arguments) — only one form can work correctly.
  • Invalid syntax in config examples: The "Basic Configuration" snippets in docs/nuxt.md and docs/vite.md embed TypeScript type-annotation syntax inside live runtime config objects, which would produce a syntax error if copy-pasted.
  • Minor style: Config shapes are documented with interface in several files; team conventions require type for plain data structures.

Confidence Score: 3/5

The 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 withAeo call signatures — one will silently misconfigure the plugin for anyone who follows it. Separately, the Basic Configuration examples in both the Nuxt and Vite guides place TypeScript type-annotation syntax inside live function-call arguments, producing code that cannot be executed as written.

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

Filename Overview
docs/README.md Overview and quick-start index; contains a conflicting withAeo single-argument signature that contradicts the two-argument form used throughout nextjs.md, and uses interface where the project convention requires type.
docs/nextjs.md Detailed Next.js guide; correctly uses the two-argument withAeo(nextConfig, { aeo }) form, but mislabels Pages Router as "Next.js 12" (it's supported in 13+), and documents config shapes with interface instead of type.
docs/nuxt.md Nuxt 3 integration guide; the "Basic Configuration" code block contains TypeScript type-annotation syntax inside a defineNuxtConfig call, which is invalid and would error if copy-pasted.
docs/astro.md Astro integration guide; content is accurate and well-structured. Uses interface AstroAeoConfig instead of type, which is a minor style concern against team conventions.
docs/vite.md Vite integration guide; the "Basic Configuration" example uses TypeScript type annotation syntax directly inside an aeoVitePlugin({...}) function call, which is invalid JS/TS and would fail if executed.

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]
Loading

Comments Outside Diff (2)

  1. docs/nuxt.md, line 1373-1385 (link)

    P1 TypeScript type-annotation syntax used inside a runtime config block

    The "Basic Configuration" example embeds TypeScript type annotation syntax (title: string;, description?: string;) directly inside a defineNuxtConfig({...}) call. This is not valid JavaScript or TypeScript — it would throw a syntax error if copy-pasted. The same pattern appears in docs/vite.md at the aeoVitePlugin({...}) basic-configuration example. These blocks should either be clearly marked as type definitions or replaced with concrete example values.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: docs/nuxt.md
    Line: 1373-1385
    
    Comment:
    **TypeScript type-annotation syntax used inside a runtime config block**
    
    The "Basic Configuration" example embeds TypeScript type annotation syntax (`title: string;`, `description?: string;`) directly inside a `defineNuxtConfig({...})` call. This is not valid JavaScript or TypeScript — it would throw a syntax error if copy-pasted. The same pattern appears in `docs/vite.md` at the `aeoVitePlugin({...})` basic-configuration example. These blocks should either be clearly marked as type definitions or replaced with concrete example values.
    
    How can I resolve this? If you propose a fix, please make it concise.
  2. docs/nextjs.md, line 807 (link)

    P2 Inaccurate section label for Pages Router

    The heading reads "For Pages Router (Next.js 12)", but the Pages Router is fully supported in Next.js 13, 14, and 15. Labelling it as "Next.js 12" implies it was deprecated at v13, which is incorrect and may cause developers on newer Next.js versions to skip this section unnecessarily.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: docs/nextjs.md
    Line: 807
    
    Comment:
    **Inaccurate section label for Pages Router**
    
    The heading reads "For Pages Router (Next.js 12)", but the Pages Router is fully supported in Next.js 13, 14, and 15. Labelling it as "Next.js 12" implies it was deprecated at v13, which is incorrect and may cause developers on newer Next.js versions to skip this section unnecessarily.
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
Fix the following 4 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 4
docs/README.md:46-57
**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.

### Issue 2 of 4
docs/nuxt.md:1373-1385
**TypeScript type-annotation syntax used inside a runtime config block**

The "Basic Configuration" example embeds TypeScript type annotation syntax (`title: string;`, `description?: string;`) directly inside a `defineNuxtConfig({...})` call. This is not valid JavaScript or TypeScript — it would throw a syntax error if copy-pasted. The same pattern appears in `docs/vite.md` at the `aeoVitePlugin({...})` basic-configuration example. These blocks should either be clearly marked as type definitions or replaced with concrete example values.

### Issue 3 of 4
docs/nextjs.md:807
**Inaccurate section label for Pages Router**

The heading reads "For Pages Router (Next.js 12)", but the Pages Router is fully supported in Next.js 13, 14, and 15. Labelling it as "Next.js 12" implies it was deprecated at v13, which is incorrect and may cause developers on newer Next.js versions to skip this section unnecessarily.

### Issue 4 of 4
docs/README.md:189-211
**`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.

Reviews (1): Last reviewed commit: "docs: add comprehensive framework integr..." | Re-trigger Greptile

Comment thread docs/README.md
Comment on lines +46 to +57
title: 'My Site',
description: 'Optimized for AI discovery',
url: 'https://mysite.com',
},
});
```

[→ Full Next.js Guide](./nextjs.md)

### Astro
```bash
npm install aeo.js
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

Comment thread docs/README.md
Comment on lines +189 to +211
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:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant