@rankcli/agent-runtime 0.0.14 → 0.0.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 (199) hide show
  1. package/dist/index.d.mts +77 -393
  2. package/dist/index.d.ts +77 -393
  3. package/dist/index.js +417 -6443
  4. package/dist/index.mjs +296 -6313
  5. package/package.json +6 -1
  6. package/scripts/build-deno.ts +0 -134
  7. package/src/analyzers/core-web-vitals-analyzer.test.ts +0 -236
  8. package/src/analyzers/core-web-vitals-analyzer.ts +0 -557
  9. package/src/analyzers/geo-analyzer.test.ts +0 -310
  10. package/src/analyzers/geo-analyzer.ts +0 -814
  11. package/src/analyzers/image-optimization-analyzer.test.ts +0 -145
  12. package/src/analyzers/image-optimization-analyzer.ts +0 -348
  13. package/src/analyzers/index.ts +0 -233
  14. package/src/analyzers/internal-linking-analyzer.test.ts +0 -141
  15. package/src/analyzers/internal-linking-analyzer.ts +0 -419
  16. package/src/analyzers/mobile-seo-analyzer.test.ts +0 -140
  17. package/src/analyzers/mobile-seo-analyzer.ts +0 -455
  18. package/src/analyzers/security-headers-analyzer.test.ts +0 -115
  19. package/src/analyzers/security-headers-analyzer.ts +0 -318
  20. package/src/analyzers/structured-data-analyzer.test.ts +0 -210
  21. package/src/analyzers/structured-data-analyzer.ts +0 -590
  22. package/src/audit/ai/analyzer.ts +0 -347
  23. package/src/audit/ai/index.ts +0 -29
  24. package/src/audit/ai/prompts/content-analysis.ts +0 -271
  25. package/src/audit/ai/types.ts +0 -179
  26. package/src/audit/checks/additional-checks.ts +0 -439
  27. package/src/audit/checks/ai-citation-worthiness.ts +0 -399
  28. package/src/audit/checks/ai-content-structure.ts +0 -325
  29. package/src/audit/checks/ai-readiness.ts +0 -339
  30. package/src/audit/checks/anchor-text.ts +0 -179
  31. package/src/audit/checks/answer-conciseness.ts +0 -322
  32. package/src/audit/checks/asset-minification.ts +0 -270
  33. package/src/audit/checks/bing-optimization.ts +0 -206
  34. package/src/audit/checks/brand-mention-optimization.ts +0 -349
  35. package/src/audit/checks/caching-headers.ts +0 -305
  36. package/src/audit/checks/canonical-advanced.ts +0 -150
  37. package/src/audit/checks/canonical-domain.ts +0 -196
  38. package/src/audit/checks/citation-quality.ts +0 -358
  39. package/src/audit/checks/client-rendering.ts +0 -542
  40. package/src/audit/checks/color-contrast.ts +0 -342
  41. package/src/audit/checks/content-freshness.ts +0 -170
  42. package/src/audit/checks/content-science.ts +0 -589
  43. package/src/audit/checks/conversion-elements.ts +0 -526
  44. package/src/audit/checks/crawlability.ts +0 -220
  45. package/src/audit/checks/directory-listing.ts +0 -172
  46. package/src/audit/checks/dom-analysis.ts +0 -191
  47. package/src/audit/checks/dom-size.ts +0 -246
  48. package/src/audit/checks/duplicate-content.ts +0 -194
  49. package/src/audit/checks/eeat-signals.ts +0 -990
  50. package/src/audit/checks/entity-seo.ts +0 -396
  51. package/src/audit/checks/featured-snippet.ts +0 -473
  52. package/src/audit/checks/freshness-signals.ts +0 -443
  53. package/src/audit/checks/funnel-intent.ts +0 -463
  54. package/src/audit/checks/hreflang.ts +0 -174
  55. package/src/audit/checks/html-compliance.ts +0 -302
  56. package/src/audit/checks/image-dimensions.ts +0 -167
  57. package/src/audit/checks/images.ts +0 -160
  58. package/src/audit/checks/indexnow.ts +0 -275
  59. package/src/audit/checks/interactive-tools.ts +0 -475
  60. package/src/audit/checks/internal-link-graph.ts +0 -436
  61. package/src/audit/checks/keyword-analysis.ts +0 -239
  62. package/src/audit/checks/keyword-cannibalization.ts +0 -385
  63. package/src/audit/checks/keyword-placement.ts +0 -471
  64. package/src/audit/checks/links.ts +0 -273
  65. package/src/audit/checks/llms-txt.ts +0 -224
  66. package/src/audit/checks/local-seo.ts +0 -296
  67. package/src/audit/checks/mobile.ts +0 -167
  68. package/src/audit/checks/modern-images.ts +0 -226
  69. package/src/audit/checks/navboost-signals.ts +0 -395
  70. package/src/audit/checks/on-page.ts +0 -209
  71. package/src/audit/checks/page-resources.ts +0 -285
  72. package/src/audit/checks/pagination.ts +0 -180
  73. package/src/audit/checks/performance.ts +0 -153
  74. package/src/audit/checks/platform-presence.ts +0 -580
  75. package/src/audit/checks/redirect-analysis.ts +0 -153
  76. package/src/audit/checks/redirect-chain.ts +0 -389
  77. package/src/audit/checks/resource-hints.ts +0 -420
  78. package/src/audit/checks/responsive-css.ts +0 -247
  79. package/src/audit/checks/responsive-images.ts +0 -396
  80. package/src/audit/checks/review-ecosystem.ts +0 -415
  81. package/src/audit/checks/robots-validation.ts +0 -373
  82. package/src/audit/checks/security-headers.ts +0 -188
  83. package/src/audit/checks/security.ts +0 -144
  84. package/src/audit/checks/serp-preview.ts +0 -251
  85. package/src/audit/checks/site-maturity.ts +0 -453
  86. package/src/audit/checks/social-meta.test.ts +0 -275
  87. package/src/audit/checks/social-meta.ts +0 -134
  88. package/src/audit/checks/soft-404.ts +0 -151
  89. package/src/audit/checks/structured-data.ts +0 -238
  90. package/src/audit/checks/tech-detection.ts +0 -496
  91. package/src/audit/checks/topical-clusters.ts +0 -435
  92. package/src/audit/checks/tracker-bloat.ts +0 -462
  93. package/src/audit/checks/tracking-verification.test.ts +0 -371
  94. package/src/audit/checks/tracking-verification.ts +0 -636
  95. package/src/audit/checks/url-safety.ts +0 -682
  96. package/src/audit/deno-entry.ts +0 -66
  97. package/src/audit/discovery/index.ts +0 -15
  98. package/src/audit/discovery/link-crawler.ts +0 -233
  99. package/src/audit/discovery/repo-routes.ts +0 -347
  100. package/src/audit/engine.ts +0 -627
  101. package/src/audit/fixes/index.ts +0 -209
  102. package/src/audit/fixes/social-meta-fixes.test.ts +0 -329
  103. package/src/audit/fixes/social-meta-fixes.ts +0 -463
  104. package/src/audit/index.ts +0 -74
  105. package/src/audit/runner.test.ts +0 -299
  106. package/src/audit/runner.ts +0 -130
  107. package/src/audit/types.ts +0 -1963
  108. package/src/content/featured-snippet.ts +0 -367
  109. package/src/content/generator.test.ts +0 -534
  110. package/src/content/generator.ts +0 -501
  111. package/src/content/headline.ts +0 -317
  112. package/src/content/index.ts +0 -62
  113. package/src/content/intent.ts +0 -258
  114. package/src/content/keyword-density.ts +0 -349
  115. package/src/content/readability.ts +0 -262
  116. package/src/executor.ts +0 -336
  117. package/src/fixer/framework-fixes.test.ts +0 -489
  118. package/src/fixer/framework-fixes.ts +0 -5287
  119. package/src/fixer/index.ts +0 -6
  120. package/src/fixer/schemas.ts +0 -971
  121. package/src/fixer.ts +0 -642
  122. package/src/frameworks/detector.test.ts +0 -248
  123. package/src/frameworks/detector.ts +0 -899
  124. package/src/frameworks/index.ts +0 -68
  125. package/src/frameworks/recipes/angular.yaml +0 -171
  126. package/src/frameworks/recipes/astro.yaml +0 -206
  127. package/src/frameworks/recipes/django.yaml +0 -180
  128. package/src/frameworks/recipes/laravel.yaml +0 -137
  129. package/src/frameworks/recipes/nextjs.yaml +0 -268
  130. package/src/frameworks/recipes/nuxt.yaml +0 -175
  131. package/src/frameworks/recipes/rails.yaml +0 -188
  132. package/src/frameworks/recipes/react.yaml +0 -202
  133. package/src/frameworks/recipes/sveltekit.yaml +0 -154
  134. package/src/frameworks/recipes/vue.yaml +0 -137
  135. package/src/frameworks/recipes/wordpress.yaml +0 -209
  136. package/src/frameworks/suggestion-engine.ts +0 -357
  137. package/src/geo/geo-content.test.ts +0 -305
  138. package/src/geo/geo-content.ts +0 -266
  139. package/src/geo/geo-history.test.ts +0 -473
  140. package/src/geo/geo-history.ts +0 -433
  141. package/src/geo/geo-tracker.test.ts +0 -359
  142. package/src/geo/geo-tracker.ts +0 -411
  143. package/src/geo/index.ts +0 -11
  144. package/src/geo/llm-citation-checker.ts +0 -188
  145. package/src/git/commit-helper.test.ts +0 -261
  146. package/src/git/commit-helper.ts +0 -329
  147. package/src/git/index.ts +0 -12
  148. package/src/git/pr-helper.test.ts +0 -284
  149. package/src/git/pr-helper.ts +0 -307
  150. package/src/index.ts +0 -76
  151. package/src/keywords/ai-keyword-engine.ts +0 -1062
  152. package/src/keywords/ai-summarizer.ts +0 -387
  153. package/src/keywords/ci-mode.ts +0 -555
  154. package/src/keywords/engine.ts +0 -359
  155. package/src/keywords/index.ts +0 -151
  156. package/src/keywords/llm-judge.ts +0 -357
  157. package/src/keywords/nlp-analysis.ts +0 -706
  158. package/src/keywords/prioritizer.ts +0 -295
  159. package/src/keywords/site-crawler.ts +0 -342
  160. package/src/keywords/sources/autocomplete.ts +0 -139
  161. package/src/keywords/sources/competitive-search.ts +0 -450
  162. package/src/keywords/sources/competitor-analysis.ts +0 -374
  163. package/src/keywords/sources/dataforseo.ts +0 -206
  164. package/src/keywords/sources/free-sources.ts +0 -294
  165. package/src/keywords/sources/gsc.ts +0 -123
  166. package/src/keywords/topic-grouping.ts +0 -327
  167. package/src/keywords/types.ts +0 -144
  168. package/src/keywords/wizard.ts +0 -457
  169. package/src/loader.ts +0 -40
  170. package/src/ranking/index.ts +0 -5
  171. package/src/ranking/serp-client.ts +0 -348
  172. package/src/ranking/tracker.ts +0 -380
  173. package/src/ranking/types.ts +0 -123
  174. package/src/reports/index.ts +0 -7
  175. package/src/reports/report-generator.test.ts +0 -293
  176. package/src/reports/report-generator.ts +0 -713
  177. package/src/scheduler/alerts.test.ts +0 -458
  178. package/src/scheduler/alerts.ts +0 -328
  179. package/src/scheduler/index.ts +0 -8
  180. package/src/scheduler/scheduled-audit.test.ts +0 -377
  181. package/src/scheduler/scheduled-audit.ts +0 -149
  182. package/src/test/integration-test.ts +0 -325
  183. package/src/tools/analyzer.ts +0 -373
  184. package/src/tools/crawl.ts +0 -293
  185. package/src/tools/files.ts +0 -301
  186. package/src/tools/h1-fixer.ts +0 -249
  187. package/src/tools/index.ts +0 -67
  188. package/src/tracking/github-action.ts +0 -326
  189. package/src/tracking/google-analytics.ts +0 -265
  190. package/src/tracking/index.ts +0 -45
  191. package/src/tracking/report-generator.ts +0 -386
  192. package/src/tracking/search-console.ts +0 -335
  193. package/src/types.ts +0 -148
  194. package/src/utils/http.ts +0 -302
  195. package/src/wasm-adapter.ts +0 -297
  196. package/src/wasm-entry.ts +0 -14
  197. package/tsconfig.json +0 -17
  198. package/tsup.wasm.config.ts +0 -26
  199. package/vitest.config.ts +0 -15
@@ -1,137 +0,0 @@
1
- # Laravel SEO Recipe
2
- # Laravel is the most popular PHP framework
3
-
4
- framework: laravel
5
- display_name: Laravel
6
- category: server-rendered
7
- ssr_default: true
8
-
9
- seo_strengths:
10
- - "Server-rendered HTML by default"
11
- - "Blade templates for clean SEO markup"
12
- - "Route caching for fast responses"
13
- - "Built-in CSRF and security"
14
-
15
- checks:
16
- - code: LARAVEL_NO_META_PACKAGE
17
- severity: warning
18
- title: "No SEO package detected"
19
- description: "Laravel benefits from an SEO package like artesaos/seotools."
20
- howToFix: |
21
- Install artesaos/seotools:
22
-
23
- ```bash
24
- composer require artesaos/seotools
25
- ```
26
-
27
- ```php
28
- // In controller
29
- use Artesaos\SEOTools\Facades\SEOMeta;
30
-
31
- SEOMeta::setTitle('Page Title');
32
- SEOMeta::setDescription('Description');
33
-
34
- // In Blade
35
- {!! SEOMeta::generate() !!}
36
- ```
37
-
38
- - code: LARAVEL_NO_SITEMAP
39
- severity: warning
40
- title: "No sitemap package detected"
41
- description: "Use spatie/laravel-sitemap for automatic sitemaps."
42
- howToFix: |
43
- ```bash
44
- composer require spatie/laravel-sitemap
45
- ```
46
-
47
- ```php
48
- // Generate sitemap
49
- use Spatie\Sitemap\SitemapGenerator;
50
-
51
- SitemapGenerator::create('https://yoursite.com')
52
- ->writeToFile(public_path('sitemap.xml'));
53
-
54
- // Or build manually
55
- use Spatie\Sitemap\Sitemap;
56
- use Spatie\Sitemap\Tags\Url;
57
-
58
- Sitemap::create()
59
- ->add(Url::create('/')->setPriority(1.0))
60
- ->add(Url::create('/about'))
61
- ->writeToFile(public_path('sitemap.xml'));
62
- ```
63
-
64
- - code: LARAVEL_INERTIA_NO_SSR
65
- severity: error
66
- title: "Inertia.js without SSR"
67
- description: "Inertia apps are client-rendered by default, losing SEO benefits."
68
- howToFix: |
69
- Enable Inertia SSR:
70
-
71
- ```bash
72
- php artisan inertia:start-ssr
73
- ```
74
-
75
- Configure in config/inertia.php:
76
- ```php
77
- 'ssr' => [
78
- 'enabled' => true,
79
- 'url' => 'http://127.0.0.1:13714',
80
- ],
81
- ```
82
-
83
- - code: LARAVEL_NO_RESPONSE_CACHE
84
- severity: notice
85
- title: "Response caching not configured"
86
- description: "Cache full responses for better performance."
87
- howToFix: |
88
- Install spatie/laravel-responsecache:
89
-
90
- ```bash
91
- composer require spatie/laravel-responsecache
92
- ```
93
-
94
- Add middleware:
95
- ```php
96
- // app/Http/Kernel.php
97
- protected $middlewareGroups = [
98
- 'web' => [
99
- \Spatie\ResponseCache\Middlewares\CacheResponse::class,
100
- ],
101
- ];
102
- ```
103
-
104
- - code: LARAVEL_LIVEWIRE_SEO
105
- severity: warning
106
- title: "Livewire components may affect SEO"
107
- description: "Livewire content loads via JavaScript after initial page load."
108
- howToFix: |
109
- For SEO-critical content, use wire:init to load immediately:
110
-
111
- ```blade
112
- <div wire:init="loadData">
113
- @if($data)
114
- {{-- Content --}}
115
- @else
116
- {{-- Loading skeleton --}}
117
- @endif
118
- </div>
119
- ```
120
-
121
- Or use Alpine.js for client-only interactions.
122
-
123
- performance_tips:
124
- - "Enable route caching: php artisan route:cache"
125
- - "Enable config caching: php artisan config:cache"
126
- - "Use query caching with remember()"
127
- - "Optimize autoloader: composer dump-autoload -o"
128
- - "Use Laravel Octane for high performance"
129
-
130
- recommended_packages:
131
- seo:
132
- - "artesaos/seotools - Meta tag management"
133
- - "spatie/laravel-sitemap - Sitemap generation"
134
- - "spatie/schema-org - Structured data"
135
- performance:
136
- - "spatie/laravel-responsecache - Full page caching"
137
- - "barryvdh/laravel-debugbar - Development profiling"
@@ -1,268 +0,0 @@
1
- # Next.js SEO Recipe
2
- # Next.js has excellent SEO by default, but there are still common mistakes
3
-
4
- framework: nextjs
5
- display_name: Next.js
6
- category: meta-framework
7
- base_framework: react
8
- ssr_default: true
9
-
10
- seo_strengths:
11
- - "Server-side rendering by default"
12
- - "Static site generation support"
13
- - "Built-in Image component with optimization"
14
- - "Automatic code splitting"
15
- - "File-based routing"
16
- - "Built-in metadata API (App Router)"
17
-
18
- checks:
19
- # App Router specific
20
- - code: NEXTJS_NO_METADATA_API
21
- severity: warning
22
- title: "Not using Next.js Metadata API"
23
- description: "Next.js 13+ has a built-in Metadata API that's better than react-helmet."
24
- howToFix: |
25
- Use the Metadata API in your layout or page:
26
-
27
- ```tsx
28
- // app/page.tsx
29
- import { Metadata } from 'next';
30
-
31
- export const metadata: Metadata = {
32
- title: 'Page Title',
33
- description: 'Page description',
34
- openGraph: {
35
- title: 'OG Title',
36
- description: 'OG Description',
37
- images: ['/og-image.jpg'],
38
- },
39
- };
40
-
41
- // For dynamic metadata
42
- export async function generateMetadata({ params }): Promise<Metadata> {
43
- const product = await getProduct(params.id);
44
- return {
45
- title: product.name,
46
- description: product.description,
47
- };
48
- }
49
- ```
50
- app_router_only: true
51
-
52
- - code: NEXTJS_GENERATESTATICPARAMS_MISSING
53
- severity: warning
54
- title: "Dynamic routes without generateStaticParams"
55
- description: "Dynamic routes like [id] should pre-generate static pages for SEO."
56
- howToFix: |
57
- Add generateStaticParams to pre-render dynamic pages:
58
-
59
- ```tsx
60
- // app/products/[id]/page.tsx
61
- export async function generateStaticParams() {
62
- const products = await getProducts();
63
- return products.map((product) => ({
64
- id: product.id.toString(),
65
- }));
66
- }
67
- ```
68
- app_router_only: true
69
-
70
- # Pages Router specific
71
- - code: NEXTJS_NO_GETSTATICPROPS
72
- severity: warning
73
- title: "Pages without getStaticProps/getServerSideProps"
74
- description: "Pages fetching data client-side miss SEO benefits of SSR/SSG."
75
- howToFix: |
76
- Move data fetching to getStaticProps (for static) or getServerSideProps (for dynamic):
77
-
78
- ```tsx
79
- // pages/products.tsx
80
- export async function getStaticProps() {
81
- const products = await fetchProducts();
82
- return {
83
- props: { products },
84
- revalidate: 3600, // ISR: regenerate every hour
85
- };
86
- }
87
- ```
88
- pages_router_only: true
89
-
90
- # Common issues
91
- - code: NEXTJS_IMAGE_NOT_USED
92
- severity: warning
93
- title: "Using <img> instead of next/image"
94
- description: "The next/image component provides automatic optimization, lazy loading, and prevents CLS."
95
- howToFix: |
96
- Replace <img> with next/image:
97
-
98
- ```tsx
99
- import Image from 'next/image';
100
-
101
- // Before
102
- <img src="/hero.jpg" alt="Hero" />
103
-
104
- // After
105
- <Image
106
- src="/hero.jpg"
107
- alt="Hero"
108
- width={1200}
109
- height={630}
110
- priority // for above-the-fold images
111
- />
112
- ```
113
-
114
- - code: NEXTJS_NO_PRIORITY_IMAGE
115
- severity: notice
116
- title: "LCP image missing priority prop"
117
- description: "The largest image above the fold should have priority={true} for faster LCP."
118
- howToFix: |
119
- Add priority to your hero/LCP image:
120
-
121
- ```tsx
122
- <Image
123
- src="/hero.jpg"
124
- alt="Hero"
125
- width={1200}
126
- height={630}
127
- priority
128
- />
129
- ```
130
-
131
- - code: NEXTJS_LINK_NO_PREFETCH
132
- severity: notice
133
- title: "Link without prefetch consideration"
134
- description: "Next.js prefetches all links by default, which can waste bandwidth."
135
- howToFix: |
136
- Disable prefetch for less important links:
137
-
138
- ```tsx
139
- <Link href="/terms" prefetch={false}>
140
- Terms of Service
141
- </Link>
142
- ```
143
-
144
- - code: NEXTJS_NO_ROBOTS_TXT
145
- severity: warning
146
- title: "Missing robots.txt configuration"
147
- description: "Next.js can generate robots.txt automatically."
148
- howToFix: |
149
- App Router - create app/robots.ts:
150
- ```tsx
151
- import { MetadataRoute } from 'next';
152
-
153
- export default function robots(): MetadataRoute.Robots {
154
- return {
155
- rules: {
156
- userAgent: '*',
157
- allow: '/',
158
- disallow: '/api/',
159
- },
160
- sitemap: 'https://yoursite.com/sitemap.xml',
161
- };
162
- }
163
- ```
164
-
165
- Pages Router - create public/robots.txt or use next-sitemap package.
166
-
167
- - code: NEXTJS_NO_SITEMAP
168
- severity: warning
169
- title: "Missing sitemap configuration"
170
- description: "Next.js can generate sitemaps automatically."
171
- howToFix: |
172
- App Router - create app/sitemap.ts:
173
- ```tsx
174
- import { MetadataRoute } from 'next';
175
-
176
- export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
177
- const products = await getProducts();
178
-
179
- return [
180
- { url: 'https://yoursite.com', lastModified: new Date() },
181
- { url: 'https://yoursite.com/about', lastModified: new Date() },
182
- ...products.map((product) => ({
183
- url: `https://yoursite.com/products/${product.id}`,
184
- lastModified: product.updatedAt,
185
- })),
186
- ];
187
- }
188
- ```
189
-
190
- - code: NEXTJS_USE_CLIENT_OVERUSE
191
- severity: warning
192
- title: "Overusing 'use client' directive"
193
- description: "Too many client components reduces SSR benefits."
194
- howToFix: |
195
- Keep 'use client' at the leaf level:
196
-
197
- ```tsx
198
- // Bad - entire page is client-rendered
199
- 'use client';
200
- export default function Page() { ... }
201
-
202
- // Good - only interactive parts are client
203
- // page.tsx (Server Component)
204
- import ClientButton from './ClientButton';
205
- export default function Page() {
206
- return <div>
207
- <h1>Server rendered content</h1>
208
- <ClientButton /> {/* Only this is client */}
209
- </div>
210
- }
211
- ```
212
-
213
- - code: NEXTJS_FONT_NOT_OPTIMIZED
214
- severity: notice
215
- title: "Not using next/font for fonts"
216
- description: "next/font automatically optimizes fonts and prevents CLS."
217
- howToFix: |
218
- Use next/font for Google Fonts or local fonts:
219
-
220
- ```tsx
221
- import { Inter } from 'next/font/google';
222
-
223
- const inter = Inter({ subsets: ['latin'] });
224
-
225
- export default function RootLayout({ children }) {
226
- return (
227
- <html lang="en" className={inter.className}>
228
- <body>{children}</body>
229
- </html>
230
- );
231
- }
232
- ```
233
-
234
- - code: NEXTJS_NO_TRAILING_SLASH_CONFIG
235
- severity: notice
236
- title: "Inconsistent trailing slash handling"
237
- description: "Inconsistent URLs can cause duplicate content issues."
238
- howToFix: |
239
- Configure trailingSlash in next.config.js:
240
-
241
- ```js
242
- module.exports = {
243
- trailingSlash: true, // or false
244
- };
245
- ```
246
-
247
- performance_tips:
248
- - "Use React Server Components for static content"
249
- - "Add priority to LCP images"
250
- - "Use next/font for fonts"
251
- - "Enable ISR for frequently updated pages"
252
- - "Use Route Handlers instead of API routes for server-only logic"
253
-
254
- structured_data:
255
- - type: "JSON-LD in metadata"
256
- example: |
257
- ```tsx
258
- export const metadata: Metadata = {
259
- other: {
260
- 'script:ld+json': JSON.stringify({
261
- '@context': 'https://schema.org',
262
- '@type': 'Organization',
263
- name: 'Your Company',
264
- url: 'https://yoursite.com',
265
- }),
266
- },
267
- };
268
- ```
@@ -1,175 +0,0 @@
1
- # Nuxt SEO Recipe
2
- # Nuxt has excellent SEO capabilities, similar to Next.js for Vue
3
-
4
- framework: nuxt
5
- display_name: Nuxt
6
- category: meta-framework
7
- base_framework: vue
8
- ssr_default: true
9
-
10
- seo_strengths:
11
- - "Universal rendering (SSR) by default"
12
- - "Static site generation support"
13
- - "Built-in useSeoMeta composable"
14
- - "Automatic code splitting"
15
- - "File-based routing"
16
- - "NuxtImage for image optimization"
17
-
18
- checks:
19
- - code: NUXT_NO_USESEOMETA
20
- severity: warning
21
- title: "Not using useSeoMeta composable"
22
- description: "Nuxt 3 has built-in SEO meta composables that are cleaner than useHead."
23
- howToFix: |
24
- Use useSeoMeta for SEO tags:
25
-
26
- ```vue
27
- <script setup>
28
- useSeoMeta({
29
- title: 'Page Title',
30
- description: 'Page description',
31
- ogTitle: 'OG Title',
32
- ogDescription: 'OG Description',
33
- ogImage: '/og-image.jpg',
34
- twitterCard: 'summary_large_image',
35
- });
36
- </script>
37
- ```
38
-
39
- - code: NUXT_USEFETCH_CLIENT_ONLY
40
- severity: warning
41
- title: "Data fetching only on client side"
42
- description: "Using onMounted for data fetching bypasses SSR benefits."
43
- howToFix: |
44
- Use useFetch or useAsyncData instead:
45
-
46
- ```vue
47
- <script setup>
48
- // Bad - client only
49
- const data = ref(null);
50
- onMounted(async () => {
51
- data.value = await $fetch('/api/data');
52
- });
53
-
54
- // Good - SSR friendly
55
- const { data } = await useFetch('/api/data');
56
- </script>
57
- ```
58
-
59
- - code: NUXT_NO_NUXT_IMAGE
60
- severity: warning
61
- title: "Not using NuxtImage for images"
62
- description: "@nuxt/image provides automatic optimization and responsive images."
63
- howToFix: |
64
- Install and use NuxtImage:
65
-
66
- ```bash
67
- npx nuxi module add image
68
- ```
69
-
70
- ```vue
71
- <template>
72
- <NuxtImg
73
- src="/hero.jpg"
74
- alt="Hero"
75
- width="1200"
76
- height="630"
77
- preload
78
- />
79
- </template>
80
- ```
81
-
82
- - code: NUXT_NO_ROBOTS
83
- severity: warning
84
- title: "Missing robots.txt configuration"
85
- description: "Use @nuxtjs/robots module for robots.txt."
86
- howToFix: |
87
- Install and configure robots module:
88
-
89
- ```bash
90
- npm install @nuxtjs/robots
91
- ```
92
-
93
- ```ts
94
- // nuxt.config.ts
95
- export default defineNuxtConfig({
96
- modules: ['@nuxtjs/robots'],
97
- robots: {
98
- rules: [
99
- { UserAgent: '*', Allow: '/' },
100
- { UserAgent: '*', Disallow: '/api/' },
101
- ],
102
- sitemap: 'https://yoursite.com/sitemap.xml',
103
- },
104
- });
105
- ```
106
-
107
- - code: NUXT_NO_SITEMAP
108
- severity: warning
109
- title: "Missing sitemap configuration"
110
- description: "Use @nuxtjs/sitemap module for automatic sitemap."
111
- howToFix: |
112
- Install sitemap module:
113
-
114
- ```bash
115
- npm install @nuxtjs/sitemap
116
- ```
117
-
118
- ```ts
119
- // nuxt.config.ts
120
- export default defineNuxtConfig({
121
- modules: ['@nuxtjs/sitemap'],
122
- sitemap: {
123
- hostname: 'https://yoursite.com',
124
- },
125
- });
126
- ```
127
-
128
- - code: NUXT_SPA_MODE
129
- severity: error
130
- title: "Nuxt running in SPA mode"
131
- description: "SPA mode disables SSR, losing SEO benefits."
132
- howToFix: |
133
- Remove ssr: false from nuxt.config.ts:
134
-
135
- ```ts
136
- export default defineNuxtConfig({
137
- // Remove this line
138
- // ssr: false,
139
- });
140
- ```
141
-
142
- If you need client-only components, use <ClientOnly>:
143
- ```vue
144
- <ClientOnly>
145
- <BrowserOnlyWidget />
146
- </ClientOnly>
147
- ```
148
-
149
- - code: NUXT_NO_PRERENDER
150
- severity: notice
151
- title: "Static pages not pre-rendered"
152
- description: "Static pages could be pre-rendered for better performance."
153
- howToFix: |
154
- Enable route prerendering in nuxt.config.ts:
155
-
156
- ```ts
157
- export default defineNuxtConfig({
158
- routeRules: {
159
- '/about': { prerender: true },
160
- '/blog/**': { prerender: true },
161
- },
162
- });
163
- ```
164
-
165
- Or generate a fully static site:
166
- ```bash
167
- nuxt generate
168
- ```
169
-
170
- performance_tips:
171
- - "Use useLazyFetch for non-critical data"
172
- - "Add preload prop to NuxtImg for LCP images"
173
- - "Use Nuxt DevTools to identify performance issues"
174
- - "Configure image provider for CDN delivery"
175
- - "Use route rules for caching strategies"