sanity-plugin-seo-copilot 0.2.14 → 0.2.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +63 -50
  2. package/dist/index.js +868 -797
  3. package/dist/index.mjs +791 -720
  4. package/package.json +9 -8
  5. package/dist/index.js.map +0 -1
  6. package/dist/index.mjs.map +0 -1
  7. package/sanity.json +0 -3
  8. package/src/components/ChatPanel.tsx +0 -311
  9. package/src/components/ConfigContext.tsx +0 -22
  10. package/src/components/FeedbackButton.tsx +0 -218
  11. package/src/components/KeywordBadge.tsx +0 -50
  12. package/src/components/KeywordPanel.tsx +0 -1233
  13. package/src/components/OnboardingPopup.tsx +0 -108
  14. package/src/components/PlacementIndicators.tsx +0 -80
  15. package/src/components/ReportProblemButton.tsx +0 -212
  16. package/src/components/SEOCopilotPanel.tsx +0 -1287
  17. package/src/components/ScoreDonut.tsx +0 -158
  18. package/src/components/SeedKeywordInput.tsx +0 -128
  19. package/src/components/ShimmerLoader.tsx +0 -123
  20. package/src/components/TabBar.tsx +0 -373
  21. package/src/components/styles.ts +0 -158
  22. package/src/components/tabs/AEOTab.tsx +0 -585
  23. package/src/components/tabs/LinkingTab.tsx +0 -446
  24. package/src/components/tabs/MetaTab.tsx +0 -431
  25. package/src/components/tabs/SummaryTab.tsx +0 -405
  26. package/src/components/tabs/TechnicalTab.tsx +0 -933
  27. package/src/hooks/useDocumentContent.ts +0 -48
  28. package/src/hooks/useKeywordAnalysis.ts +0 -292
  29. package/src/hooks/useSEOChat.ts +0 -254
  30. package/src/index.ts +0 -16
  31. package/src/inspector.ts +0 -58
  32. package/src/lib/api.ts +0 -260
  33. package/src/lib/documentExtract.ts +0 -422
  34. package/src/lib/geoAnalysis.ts +0 -122
  35. package/src/lib/persistence.ts +0 -69
  36. package/src/lib/scoring.ts +0 -197
  37. package/src/lib/summary.ts +0 -645
  38. package/src/lib/types.ts +0 -212
  39. package/src/lib/utils.ts +0 -35
  40. package/v2-incompatible.js +0 -10
package/README.md CHANGED
@@ -1,50 +1,63 @@
1
- # sanity-plugin-seo-copilot
2
-
3
- AI-powered SEO writing assistant for Sanity Studio v3.
4
-
5
- Adds an SEO Copilot inspector panel to every document in your Sanity Studio. Editors get real-time keyword analysis, search volume data, placement tracking, and an AI chat assistant - all without leaving the editor.
6
-
7
- ## Installation
8
-
9
- ```sh
10
- npm install sanity-plugin-seo-copilot
11
- ```
12
-
13
- ## Configuration
14
-
15
- Add the plugin to your `sanity.config.ts`:
16
-
17
- ```ts
18
- import { defineConfig } from 'sanity'
19
- import { seoCopilot } from 'sanity-plugin-seo-copilot'
20
-
21
- export default defineConfig({
22
- // ... your existing config
23
- plugins: [
24
- // ... your existing plugins
25
- seoCopilot({
26
- apiUrl: 'https://ecaruso.vercel.app',
27
- publication: 'Your Publication Name', // optional
28
- }),
29
- ],
30
- })
31
- ```
32
-
33
- ### Options
34
-
35
- | Option | Type | Required | Description |
36
- | ------------- | ------ | -------- | ------------------------------------------------ |
37
- | `apiUrl` | string | Yes | Backend API URL for SEO analysis |
38
- | `publication` | string | No | Publication name for tailored keyword suggestions |
39
-
40
- ## Usage
41
-
42
- Once installed, every document in your Studio gets an SEO Copilot icon in the toolbar. Click it to open the inspector panel with:
43
-
44
- - **Keywords tab** - Real-time keyword analysis with search volume data, placement indicators (body, title, description, image, URL), and AI-suggested keywords
45
- - **Chat tab** - AI assistant that understands your document content and can help with SEO strategy, title suggestions, meta descriptions, and more
46
-
47
- ## How it works
48
-
49
- The plugin reads document content from the Sanity editor and sends it to the backend API for analysis. The backend uses Claude AI for keyword analysis and SEMrush for search volume data. All processing happens server-side - the plugin itself is a lightweight UI.
50
-
1
+ # sanity-plugin-seo-copilot
2
+
3
+ AI-powered SEO writing assistant for Sanity Studio v3.
4
+
5
+ Adds an SEO Copilot inspector panel to every document in your Sanity Studio. Editors get real-time keyword analysis, search volume data, placement tracking, and an AI chat assistant - all without leaving the editor.
6
+
7
+ ## Installation
8
+
9
+ ```sh
10
+ npm install sanity-plugin-seo-copilot
11
+ ```
12
+
13
+ ## Configuration
14
+
15
+ Add the plugin to your `sanity.config.ts`:
16
+
17
+ ```ts
18
+ import { defineConfig } from 'sanity'
19
+ import { seoCopilot } from 'sanity-plugin-seo-copilot'
20
+
21
+ export default defineConfig({
22
+ // ... your existing config
23
+ plugins: [
24
+ // ... your existing plugins
25
+ seoCopilot({
26
+ apiUrl: 'https://ecaruso.vercel.app',
27
+ publication: 'onclive', // optional - defaults to the current workspace's dataset
28
+ }),
29
+ ],
30
+ })
31
+ ```
32
+
33
+ ### Options
34
+
35
+ | Option | Type | Required | Description |
36
+ | ------------- | ------ | -------- | ----------- |
37
+ | `apiUrl` | string | Yes | Backend API URL for SEO analysis |
38
+ | `publication` | string | No | Optional. Sanity dataset slug (for example `onclive`). Leave unset to use the current workspace's dataset. |
39
+
40
+ ## Usage
41
+
42
+ Once installed, every document in your Studio gets an SEO Copilot icon in the toolbar. Click it to open the inspector panel with:
43
+
44
+ - **Summary** - Content score and a checklist of fixes, each linking to the tab it comes from
45
+ - **Keywords** - Primary and secondary keyword picks, search volume, placement indicators (body, title, description, image, URL), and AI-suggested keywords
46
+ - **AEO/GEO** - Question-style headings, fact density, and content suggestions for AI search
47
+ - **Linking** - Suggested internal links to related articles from the same dataset
48
+ - **Meta** - Title tag, meta description, URL slug, and author and date checks
49
+ - **Other Recs** - Headings, images, word count, and link checks
50
+ - **Chat drawer** - An AI assistant, available from every tab, that can help with SEO strategy, titles, meta descriptions, and more
51
+
52
+ ## How it works
53
+
54
+ The plugin reads document content from the Sanity editor and sends it to the backend API for analysis. The backend runs the AI analysis and looks up search volume data. All processing happens server-side - the plugin itself is a lightweight UI.
55
+
56
+ ## What gets sent
57
+
58
+ - **Analysis** - The article text and title, plus the other fields the checks read (meta description, slug, headings, image alt text and titles, body links, author and date fields), the dataset, and the keywords you pick, are sent to the backend for analysis. The Linking tab also sends the document ID so the current article is left out of its suggestions, and the link check sends the URLs found in the article so the backend can test them.
59
+ - **Chat** - Your messages, the article text, and the keyword data shown in the panel are sent to the backend to answer each message. The conversation is kept only in this browser.
60
+ - **Thumbs up / down** - Your vote, the suggestion text and any note you type, plus your Sanity user ID, document ID, and dataset when available.
61
+ - **Report a problem** - Your message, your Sanity user ID, the document ID, document type, dataset, open tab and primary keyword, the page URL, your browser's user agent, and a timestamp.
62
+
63
+ Nothing is written to Sanity. The plugin only reads the open document. Analysis results, chat, and panel settings are cached in this browser's local storage.