@rankcli/agent-runtime 0.0.15 → 0.0.17

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 (203) hide show
  1. package/README.md +5 -4
  2. package/dist/index.d.mts +44 -393
  3. package/dist/index.d.ts +44 -393
  4. package/dist/index.js +22098 -26131
  5. package/dist/index.mjs +11834 -15857
  6. package/package.json +10 -4
  7. package/scripts/build-deno.ts +0 -134
  8. package/src/analyzers/core-web-vitals-analyzer.test.ts +0 -236
  9. package/src/analyzers/core-web-vitals-analyzer.ts +0 -557
  10. package/src/analyzers/geo-analyzer.test.ts +0 -310
  11. package/src/analyzers/geo-analyzer.ts +0 -814
  12. package/src/analyzers/image-optimization-analyzer.test.ts +0 -145
  13. package/src/analyzers/image-optimization-analyzer.ts +0 -348
  14. package/src/analyzers/index.ts +0 -233
  15. package/src/analyzers/internal-linking-analyzer.test.ts +0 -141
  16. package/src/analyzers/internal-linking-analyzer.ts +0 -419
  17. package/src/analyzers/mobile-seo-analyzer.test.ts +0 -140
  18. package/src/analyzers/mobile-seo-analyzer.ts +0 -455
  19. package/src/analyzers/security-headers-analyzer.test.ts +0 -115
  20. package/src/analyzers/security-headers-analyzer.ts +0 -318
  21. package/src/analyzers/structured-data-analyzer.test.ts +0 -210
  22. package/src/analyzers/structured-data-analyzer.ts +0 -590
  23. package/src/audit/ai/analyzer.ts +0 -347
  24. package/src/audit/ai/index.ts +0 -29
  25. package/src/audit/ai/prompts/content-analysis.ts +0 -271
  26. package/src/audit/ai/types.ts +0 -179
  27. package/src/audit/checks/additional-checks.ts +0 -439
  28. package/src/audit/checks/agent-experience.ts +0 -108
  29. package/src/audit/checks/ai-citation-worthiness.ts +0 -399
  30. package/src/audit/checks/ai-content-structure.ts +0 -325
  31. package/src/audit/checks/ai-readiness.ts +0 -406
  32. package/src/audit/checks/anchor-text.ts +0 -179
  33. package/src/audit/checks/answer-conciseness.ts +0 -322
  34. package/src/audit/checks/asset-minification.ts +0 -270
  35. package/src/audit/checks/bing-optimization.ts +0 -206
  36. package/src/audit/checks/brand-mention-optimization.ts +0 -349
  37. package/src/audit/checks/caching-headers.ts +0 -305
  38. package/src/audit/checks/canonical-advanced.ts +0 -150
  39. package/src/audit/checks/canonical-domain.ts +0 -196
  40. package/src/audit/checks/citation-quality.ts +0 -358
  41. package/src/audit/checks/client-rendering.ts +0 -542
  42. package/src/audit/checks/color-contrast.ts +0 -342
  43. package/src/audit/checks/content-freshness.ts +0 -170
  44. package/src/audit/checks/content-science.ts +0 -589
  45. package/src/audit/checks/conversion-elements.ts +0 -526
  46. package/src/audit/checks/crawlability.ts +0 -220
  47. package/src/audit/checks/directory-listing.ts +0 -172
  48. package/src/audit/checks/dom-analysis.ts +0 -191
  49. package/src/audit/checks/dom-size.ts +0 -246
  50. package/src/audit/checks/duplicate-content.ts +0 -194
  51. package/src/audit/checks/eeat-signals.ts +0 -990
  52. package/src/audit/checks/entity-seo.ts +0 -396
  53. package/src/audit/checks/featured-snippet.ts +0 -473
  54. package/src/audit/checks/freshness-signals.ts +0 -443
  55. package/src/audit/checks/funnel-intent.ts +0 -463
  56. package/src/audit/checks/hreflang.ts +0 -174
  57. package/src/audit/checks/html-compliance.ts +0 -302
  58. package/src/audit/checks/image-dimensions.ts +0 -167
  59. package/src/audit/checks/images.ts +0 -160
  60. package/src/audit/checks/indexnow.ts +0 -275
  61. package/src/audit/checks/interactive-tools.ts +0 -475
  62. package/src/audit/checks/internal-link-graph.ts +0 -436
  63. package/src/audit/checks/keyword-analysis.ts +0 -239
  64. package/src/audit/checks/keyword-cannibalization.ts +0 -385
  65. package/src/audit/checks/keyword-placement.ts +0 -471
  66. package/src/audit/checks/links.ts +0 -273
  67. package/src/audit/checks/llms-txt.ts +0 -224
  68. package/src/audit/checks/local-seo.ts +0 -296
  69. package/src/audit/checks/mobile.ts +0 -167
  70. package/src/audit/checks/modern-images.ts +0 -226
  71. package/src/audit/checks/navboost-signals.ts +0 -395
  72. package/src/audit/checks/on-page.ts +0 -209
  73. package/src/audit/checks/page-resources.ts +0 -285
  74. package/src/audit/checks/pagination.ts +0 -180
  75. package/src/audit/checks/performance.ts +0 -153
  76. package/src/audit/checks/platform-presence.ts +0 -580
  77. package/src/audit/checks/rag-chunk-readiness.test.ts +0 -159
  78. package/src/audit/checks/rag-chunk-readiness.ts +0 -163
  79. package/src/audit/checks/redirect-analysis.ts +0 -153
  80. package/src/audit/checks/redirect-chain.ts +0 -389
  81. package/src/audit/checks/resource-hints.ts +0 -420
  82. package/src/audit/checks/responsive-css.ts +0 -247
  83. package/src/audit/checks/responsive-images.ts +0 -396
  84. package/src/audit/checks/review-ecosystem.ts +0 -415
  85. package/src/audit/checks/robots-validation.ts +0 -373
  86. package/src/audit/checks/security-headers.ts +0 -188
  87. package/src/audit/checks/security.ts +0 -144
  88. package/src/audit/checks/serp-preview.ts +0 -251
  89. package/src/audit/checks/site-maturity.ts +0 -453
  90. package/src/audit/checks/social-meta.test.ts +0 -275
  91. package/src/audit/checks/social-meta.ts +0 -134
  92. package/src/audit/checks/soft-404.ts +0 -151
  93. package/src/audit/checks/structured-data.ts +0 -238
  94. package/src/audit/checks/tech-detection.ts +0 -496
  95. package/src/audit/checks/topical-clusters.ts +0 -435
  96. package/src/audit/checks/tracker-bloat.ts +0 -462
  97. package/src/audit/checks/tracking-verification.test.ts +0 -371
  98. package/src/audit/checks/tracking-verification.ts +0 -636
  99. package/src/audit/checks/url-safety.ts +0 -682
  100. package/src/audit/deno-entry.ts +0 -66
  101. package/src/audit/discovery/index.ts +0 -15
  102. package/src/audit/discovery/link-crawler.ts +0 -233
  103. package/src/audit/discovery/repo-routes.ts +0 -347
  104. package/src/audit/engine.ts +0 -633
  105. package/src/audit/fixes/index.ts +0 -209
  106. package/src/audit/fixes/social-meta-fixes.test.ts +0 -329
  107. package/src/audit/fixes/social-meta-fixes.ts +0 -463
  108. package/src/audit/index.ts +0 -74
  109. package/src/audit/runner.test.ts +0 -299
  110. package/src/audit/runner.ts +0 -130
  111. package/src/audit/types.ts +0 -1987
  112. package/src/content/featured-snippet.ts +0 -367
  113. package/src/content/generator.test.ts +0 -534
  114. package/src/content/generator.ts +0 -501
  115. package/src/content/headline.ts +0 -317
  116. package/src/content/index.ts +0 -62
  117. package/src/content/intent.ts +0 -258
  118. package/src/content/keyword-density.ts +0 -349
  119. package/src/content/readability.ts +0 -262
  120. package/src/executor.ts +0 -336
  121. package/src/fixer/framework-fixes.test.ts +0 -489
  122. package/src/fixer/framework-fixes.ts +0 -5287
  123. package/src/fixer/index.ts +0 -6
  124. package/src/fixer/schemas.ts +0 -971
  125. package/src/fixer.ts +0 -642
  126. package/src/frameworks/detector.test.ts +0 -248
  127. package/src/frameworks/detector.ts +0 -899
  128. package/src/frameworks/index.ts +0 -68
  129. package/src/frameworks/recipes/angular.yaml +0 -171
  130. package/src/frameworks/recipes/astro.yaml +0 -206
  131. package/src/frameworks/recipes/django.yaml +0 -180
  132. package/src/frameworks/recipes/laravel.yaml +0 -137
  133. package/src/frameworks/recipes/nextjs.yaml +0 -268
  134. package/src/frameworks/recipes/nuxt.yaml +0 -175
  135. package/src/frameworks/recipes/rails.yaml +0 -188
  136. package/src/frameworks/recipes/react.yaml +0 -202
  137. package/src/frameworks/recipes/sveltekit.yaml +0 -154
  138. package/src/frameworks/recipes/vue.yaml +0 -137
  139. package/src/frameworks/recipes/wordpress.yaml +0 -209
  140. package/src/frameworks/suggestion-engine.ts +0 -357
  141. package/src/geo/geo-content.test.ts +0 -305
  142. package/src/geo/geo-content.ts +0 -266
  143. package/src/geo/geo-history.test.ts +0 -473
  144. package/src/geo/geo-history.ts +0 -433
  145. package/src/geo/geo-tracker.test.ts +0 -359
  146. package/src/geo/geo-tracker.ts +0 -411
  147. package/src/geo/index.ts +0 -11
  148. package/src/geo/llm-citation-checker.ts +0 -188
  149. package/src/git/commit-helper.test.ts +0 -261
  150. package/src/git/commit-helper.ts +0 -329
  151. package/src/git/index.ts +0 -12
  152. package/src/git/pr-helper.test.ts +0 -284
  153. package/src/git/pr-helper.ts +0 -307
  154. package/src/index.ts +0 -76
  155. package/src/keywords/ai-keyword-engine.ts +0 -1062
  156. package/src/keywords/ai-summarizer.ts +0 -387
  157. package/src/keywords/ci-mode.ts +0 -555
  158. package/src/keywords/engine.ts +0 -359
  159. package/src/keywords/index.ts +0 -151
  160. package/src/keywords/llm-judge.ts +0 -357
  161. package/src/keywords/nlp-analysis.ts +0 -706
  162. package/src/keywords/prioritizer.ts +0 -295
  163. package/src/keywords/site-crawler.ts +0 -342
  164. package/src/keywords/sources/autocomplete.ts +0 -139
  165. package/src/keywords/sources/competitive-search.ts +0 -450
  166. package/src/keywords/sources/competitor-analysis.ts +0 -374
  167. package/src/keywords/sources/dataforseo.ts +0 -206
  168. package/src/keywords/sources/free-sources.ts +0 -294
  169. package/src/keywords/sources/gsc.ts +0 -123
  170. package/src/keywords/topic-grouping.ts +0 -327
  171. package/src/keywords/types.ts +0 -144
  172. package/src/keywords/wizard.ts +0 -457
  173. package/src/loader.ts +0 -40
  174. package/src/ranking/index.ts +0 -5
  175. package/src/ranking/serp-client.ts +0 -348
  176. package/src/ranking/tracker.ts +0 -380
  177. package/src/ranking/types.ts +0 -123
  178. package/src/reports/index.ts +0 -7
  179. package/src/reports/report-generator.test.ts +0 -293
  180. package/src/reports/report-generator.ts +0 -713
  181. package/src/scheduler/alerts.test.ts +0 -458
  182. package/src/scheduler/alerts.ts +0 -328
  183. package/src/scheduler/index.ts +0 -8
  184. package/src/scheduler/scheduled-audit.test.ts +0 -377
  185. package/src/scheduler/scheduled-audit.ts +0 -149
  186. package/src/test/integration-test.ts +0 -325
  187. package/src/tools/analyzer.ts +0 -373
  188. package/src/tools/crawl.ts +0 -293
  189. package/src/tools/files.ts +0 -301
  190. package/src/tools/h1-fixer.ts +0 -249
  191. package/src/tools/index.ts +0 -67
  192. package/src/tracking/github-action.ts +0 -326
  193. package/src/tracking/google-analytics.ts +0 -265
  194. package/src/tracking/index.ts +0 -45
  195. package/src/tracking/report-generator.ts +0 -386
  196. package/src/tracking/search-console.ts +0 -335
  197. package/src/types.ts +0 -148
  198. package/src/utils/http.ts +0 -302
  199. package/src/wasm-adapter.ts +0 -297
  200. package/src/wasm-entry.ts +0 -14
  201. package/tsconfig.json +0 -17
  202. package/tsup.wasm.config.ts +0 -26
  203. 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"