specweave 0.23.18 → 0.24.1

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 (174) hide show
  1. package/.claude-plugin/marketplace.json +144 -45
  2. package/CLAUDE.md +137 -4
  3. package/dist/src/cli/helpers/ado-area-path-mapper.d.ts +89 -0
  4. package/dist/src/cli/helpers/ado-area-path-mapper.d.ts.map +1 -0
  5. package/dist/src/cli/helpers/ado-area-path-mapper.js +213 -0
  6. package/dist/src/cli/helpers/ado-area-path-mapper.js.map +1 -0
  7. package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.d.ts +29 -0
  8. package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.d.ts.map +1 -0
  9. package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.js +109 -0
  10. package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.js.map +1 -0
  11. package/dist/src/cli/helpers/issue-tracker/ado.d.ts +1 -0
  12. package/dist/src/cli/helpers/issue-tracker/ado.d.ts.map +1 -1
  13. package/dist/src/cli/helpers/issue-tracker/ado.js +2 -0
  14. package/dist/src/cli/helpers/issue-tracker/ado.js.map +1 -1
  15. package/dist/src/cli/helpers/smart-filter.d.ts +83 -0
  16. package/dist/src/cli/helpers/smart-filter.d.ts.map +1 -0
  17. package/dist/src/cli/helpers/smart-filter.js +265 -0
  18. package/dist/src/cli/helpers/smart-filter.js.map +1 -0
  19. package/dist/src/core/qa/quality-gate-decider.d.ts +1 -1
  20. package/dist/src/core/qa/quality-gate-decider.js +2 -2
  21. package/dist/src/core/qa/quality-gate-decider.js.map +1 -1
  22. package/dist/src/core/qa/risk-calculator.d.ts +2 -2
  23. package/dist/src/core/qa/risk-calculator.js +2 -2
  24. package/dist/src/core/repo-structure/repo-structure-manager.d.ts.map +1 -1
  25. package/dist/src/core/repo-structure/repo-structure-manager.js +76 -43
  26. package/dist/src/core/repo-structure/repo-structure-manager.js.map +1 -1
  27. package/dist/src/core/validators/ac-presence-validator.d.ts +56 -0
  28. package/dist/src/core/validators/ac-presence-validator.d.ts.map +1 -0
  29. package/dist/src/core/validators/ac-presence-validator.js +149 -0
  30. package/dist/src/core/validators/ac-presence-validator.js.map +1 -0
  31. package/dist/src/integrations/ado/area-path-mapper.d.ts +137 -0
  32. package/dist/src/integrations/ado/area-path-mapper.d.ts.map +1 -0
  33. package/dist/src/integrations/ado/area-path-mapper.js +267 -0
  34. package/dist/src/integrations/ado/area-path-mapper.js.map +1 -0
  35. package/dist/src/integrations/jira/filter-processor.d.ts +126 -0
  36. package/dist/src/integrations/jira/filter-processor.d.ts.map +1 -0
  37. package/dist/src/integrations/jira/filter-processor.js +207 -0
  38. package/dist/src/integrations/jira/filter-processor.js.map +1 -0
  39. package/dist/src/integrations/jira/jira-client.d.ts +13 -0
  40. package/dist/src/integrations/jira/jira-client.d.ts.map +1 -1
  41. package/dist/src/integrations/jira/jira-client.js +33 -0
  42. package/dist/src/integrations/jira/jira-client.js.map +1 -1
  43. package/dist/src/utils/ac-embedder.d.ts +63 -0
  44. package/dist/src/utils/ac-embedder.d.ts.map +1 -0
  45. package/dist/src/utils/ac-embedder.js +217 -0
  46. package/dist/src/utils/ac-embedder.js.map +1 -0
  47. package/dist/src/utils/env-manager.d.ts +86 -0
  48. package/dist/src/utils/env-manager.d.ts.map +1 -0
  49. package/dist/src/utils/env-manager.js +188 -0
  50. package/dist/src/utils/env-manager.js.map +1 -0
  51. package/package.json +1 -1
  52. package/plugins/specweave/.claude-plugin/plugin.json +1 -1
  53. package/plugins/specweave/agents/AGENTS-INDEX.md +1 -1
  54. package/plugins/specweave/agents/increment-quality-judge-v2/AGENT.md +9 -9
  55. package/plugins/specweave/commands/specweave-do.md +37 -0
  56. package/plugins/specweave/commands/specweave-done.md +159 -0
  57. package/plugins/specweave/commands/specweave-embed-acs.md +446 -0
  58. package/plugins/specweave/commands/specweave-next.md +148 -3
  59. package/plugins/specweave/commands/specweave-qa.md +2 -2
  60. package/plugins/specweave/hooks/pre-increment-start.sh +168 -0
  61. package/plugins/specweave/skills/SKILLS-INDEX.md +1 -1
  62. package/plugins/specweave-ado/.claude-plugin/plugin.json +1 -1
  63. package/plugins/specweave-ado/commands/specweave-ado-import-projects.md +331 -0
  64. package/plugins/specweave-alternatives/.claude-plugin/plugin.json +10 -0
  65. package/plugins/specweave-alternatives/commands/alternatives-analyze.md +336 -0
  66. package/plugins/specweave-alternatives/skills/architecture-alternatives/SKILL.md +651 -0
  67. package/plugins/specweave-alternatives/skills/bmad-method/SKILL.md +420 -0
  68. package/plugins/specweave-alternatives/skills/spec-kit-expert/SKILL.md +487 -0
  69. package/plugins/specweave-backend/commands/api-scaffold.md +80 -0
  70. package/plugins/specweave-backend/commands/crud-generate.md +109 -0
  71. package/plugins/specweave-backend/commands/migration-generate.md +139 -0
  72. package/plugins/specweave-confluent/commands/connector-deploy.md +154 -0
  73. package/plugins/specweave-confluent/commands/ksqldb-query.md +179 -0
  74. package/plugins/specweave-confluent/commands/schema-register.md +123 -0
  75. package/plugins/specweave-core/.claude-plugin/plugin.json +21 -0
  76. package/plugins/specweave-core/commands/architecture-review.md +288 -0
  77. package/plugins/specweave-core/commands/code-review.md +213 -0
  78. package/plugins/specweave-core/commands/refactor-plan.md +249 -0
  79. package/plugins/specweave-core/skills/code-quality/SKILL.md +157 -0
  80. package/plugins/specweave-core/skills/design-patterns/SKILL.md +244 -0
  81. package/plugins/specweave-core/skills/software-architecture/SKILL.md +83 -0
  82. package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +22 -0
  83. package/plugins/specweave-cost-optimizer/commands/cost-analyze.md +360 -0
  84. package/plugins/specweave-cost-optimizer/commands/cost-optimize.md +480 -0
  85. package/plugins/specweave-cost-optimizer/skills/aws-cost-expert/SKILL.md +416 -0
  86. package/plugins/specweave-cost-optimizer/skills/cloud-pricing/SKILL.md +325 -0
  87. package/plugins/specweave-cost-optimizer/skills/cost-optimization/SKILL.md +337 -0
  88. package/plugins/specweave-diagrams/.claude-plugin/plugin.json +1 -1
  89. package/plugins/specweave-diagrams/commands/diagrams-generate.md +168 -0
  90. package/plugins/specweave-docs/.claude-plugin/plugin.json +10 -0
  91. package/plugins/specweave-docs/commands/docs-generate.md +441 -0
  92. package/plugins/specweave-docs/commands/docs-init.md +334 -0
  93. package/plugins/specweave-docs/skills/docusaurus/SKILL.md +581 -0
  94. package/plugins/specweave-docs/skills/spec-driven-brainstorming/SKILL.md +689 -0
  95. package/plugins/specweave-docs/skills/technical-writing/SKILL.md +1039 -0
  96. package/plugins/specweave-docs-preview/.claude-plugin/plugin.json +1 -1
  97. package/plugins/specweave-figma/.claude-plugin/plugin.json +23 -0
  98. package/plugins/specweave-figma/commands/figma-import.md +690 -0
  99. package/plugins/specweave-figma/commands/figma-to-react.md +834 -0
  100. package/plugins/specweave-figma/commands/figma-tokens.md +815 -0
  101. package/plugins/specweave-frontend/.claude-plugin/plugin.json +21 -0
  102. package/plugins/specweave-frontend/agents/frontend-architect/AGENT.md +408 -0
  103. package/plugins/specweave-frontend/agents/frontend-architect/README.md +385 -0
  104. package/plugins/specweave-frontend/agents/frontend-architect/examples.md +590 -0
  105. package/plugins/specweave-frontend/agents/frontend-architect/templates/component-template.tsx +152 -0
  106. package/plugins/specweave-frontend/agents/frontend-architect/templates/hook-template.ts +311 -0
  107. package/plugins/specweave-frontend/agents/frontend-architect/templates/page-template.tsx +228 -0
  108. package/plugins/specweave-frontend/commands/component-generate.md +510 -0
  109. package/plugins/specweave-frontend/commands/design-system-init.md +494 -0
  110. package/plugins/specweave-frontend/commands/frontend-scaffold.md +207 -0
  111. package/plugins/specweave-frontend/commands/nextjs-setup.md +396 -0
  112. package/plugins/specweave-frontend/skills/design-system-architect/SKILL.md +278 -0
  113. package/plugins/specweave-frontend/skills/frontend/SKILL.md +420 -0
  114. package/plugins/specweave-frontend/skills/nextjs/SKILL.md +546 -0
  115. package/plugins/specweave-github/.claude-plugin/plugin.json +1 -1
  116. package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +212 -0
  117. package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +1 -1
  118. package/plugins/specweave-jira/.claude-plugin/plugin.json +1 -1
  119. package/plugins/specweave-jira/commands/import-projects.js +183 -0
  120. package/plugins/specweave-jira/commands/import-projects.md +97 -0
  121. package/plugins/specweave-jira/commands/import-projects.ts +288 -0
  122. package/plugins/specweave-jira/commands/specweave-jira-import-projects.md +298 -0
  123. package/plugins/specweave-kafka/.claude-plugin/plugin.json +1 -1
  124. package/plugins/specweave-kafka-streams/.claude-plugin/plugin.json +1 -1
  125. package/plugins/specweave-kubernetes/commands/cluster-setup.md +262 -0
  126. package/plugins/specweave-kubernetes/commands/deployment-generate.md +242 -0
  127. package/plugins/specweave-kubernetes/commands/helm-scaffold.md +333 -0
  128. package/plugins/specweave-ml/.claude-plugin/plugin.json +1 -1
  129. package/plugins/specweave-mobile/commands/app-scaffold.md +233 -0
  130. package/plugins/specweave-mobile/commands/build-config.md +256 -0
  131. package/plugins/specweave-mobile/commands/screen-generate.md +289 -0
  132. package/plugins/specweave-n8n/.claude-plugin/plugin.json +1 -1
  133. package/plugins/specweave-payments/commands/stripe-setup.md +931 -0
  134. package/plugins/specweave-payments/commands/subscription-flow.md +1193 -0
  135. package/plugins/specweave-payments/commands/subscription-manage.md +386 -0
  136. package/plugins/specweave-payments/commands/webhook-setup.md +295 -0
  137. package/plugins/specweave-plugin-dev/.claude-plugin/plugin.json +13 -12
  138. package/plugins/specweave-plugin-dev/commands/plugin-create.md +333 -0
  139. package/plugins/specweave-plugin-dev/commands/plugin-publish.md +339 -0
  140. package/plugins/specweave-plugin-dev/commands/plugin-test.md +293 -0
  141. package/plugins/specweave-plugin-dev/skills/claude-sdk/SKILL.md +162 -0
  142. package/plugins/specweave-plugin-dev/skills/marketplace-publishing/SKILL.md +263 -0
  143. package/plugins/specweave-plugin-dev/skills/plugin-development/SKILL.md +316 -0
  144. package/plugins/specweave-release/.claude-plugin/plugin.json +1 -1
  145. package/plugins/specweave-release/commands/specweave-release-npm.md +110 -0
  146. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +168 -0
  147. package/plugins/specweave-testing/.claude-plugin/plugin.json +21 -0
  148. package/plugins/specweave-testing/agents/qa-engineer/AGENT.md +818 -0
  149. package/plugins/specweave-testing/agents/qa-engineer/README.md +443 -0
  150. package/plugins/specweave-testing/agents/qa-engineer/templates/playwright-e2e-test.ts +470 -0
  151. package/plugins/specweave-testing/agents/qa-engineer/templates/test-data-factory.ts +507 -0
  152. package/plugins/specweave-testing/agents/qa-engineer/templates/vitest-unit-test.ts +400 -0
  153. package/plugins/specweave-testing/agents/qa-engineer/test-strategies.md +726 -0
  154. package/plugins/specweave-testing/commands/e2e-setup.md +1081 -0
  155. package/plugins/specweave-testing/commands/test-coverage.md +979 -0
  156. package/plugins/specweave-testing/commands/test-generate.md +1156 -0
  157. package/plugins/specweave-testing/commands/test-init.md +409 -0
  158. package/plugins/specweave-testing/skills/e2e-playwright/SKILL.md +769 -0
  159. package/plugins/specweave-testing/skills/tdd-expert/SKILL.md +934 -0
  160. package/plugins/specweave-testing/skills/unit-testing-expert/SKILL.md +1011 -0
  161. package/plugins/specweave-tooling/.claude-plugin/plugin.json +22 -0
  162. package/plugins/specweave-tooling/commands/specweave-tooling-skill-create.md +691 -0
  163. package/plugins/specweave-tooling/commands/specweave-tooling-skill-package.md +751 -0
  164. package/plugins/specweave-tooling/commands/specweave-tooling-skill-validate.md +858 -0
  165. package/plugins/specweave-ui/.claude-plugin/plugin.json +10 -0
  166. package/plugins/specweave-ui/commands/ui-automate.md +199 -0
  167. package/plugins/specweave-ui/commands/ui-inspect.md +70 -0
  168. package/plugins/specweave-ui/skills/browser-automation/SKILL.md +314 -0
  169. package/plugins/specweave-ui/skills/ui-testing/SKILL.md +716 -0
  170. package/plugins/specweave-ui/skills/visual-regression/SKILL.md +728 -0
  171. package/plugins/specweave/commands/check-hooks.md +0 -257
  172. package/plugins/specweave/commands/specweave-archive-increments.md +0 -82
  173. package/plugins/specweave-plugin-dev/skills/plugin-expert/SKILL.md +0 -1231
  174. /package/plugins/specweave/{agents/code-reviewer.md → skills/code-reviewer/SKILL.md} +0 -0
@@ -0,0 +1,581 @@
1
+ ---
2
+ name: docusaurus
3
+ description: Docusaurus documentation expert. Specializes in creating, configuring, and deploying Docusaurus documentation sites, MDX authoring, plugin development, theming, versioning, and i18n. Activates for Docusaurus, documentation site, docs, MDX, markdown docs, static site generator, documentation framework, Docusaurus plugins, Docusaurus themes.
4
+ ---
5
+
6
+ # Docusaurus Expert Skill
7
+
8
+ Expert in Docusaurus 3.x documentation framework - the modern static site generator for technical documentation, blogs, and landing pages.
9
+
10
+ ## Core Competencies
11
+
12
+ ### 1. Site Setup & Configuration
13
+ - **Installation**: Quick start with templates
14
+ - **Configuration**: `docusaurus.config.ts` best practices
15
+ - **Plugins**: Content, search, analytics, sitemap
16
+ - **Themes**: Classic, Material, custom themes
17
+ - **Deployment**: GitHub Pages, Netlify, Vercel, AWS
18
+
19
+ ### 2. Content Authoring
20
+ - **Markdown**: Standard Markdown with Docusaurus extensions
21
+ - **MDX**: React components in Markdown
22
+ - **Code Blocks**: Syntax highlighting, live code editors
23
+ - **Admonitions**: Notes, tips, warnings, danger alerts
24
+ - **Tabs**: Multi-language examples, platform-specific content
25
+
26
+ ### 3. Advanced Features
27
+ - **Versioning**: Multi-version documentation management
28
+ - **i18n**: Internationalization and localization
29
+ - **Search**: Algolia DocSearch, local search plugins
30
+ - **Mermaid**: Diagram support with @docusaurus/theme-mermaid
31
+ - **OpenAPI**: API documentation with docusaurus-plugin-openapi-docs
32
+
33
+ ### 4. Customization
34
+ - **Custom Components**: React components for docs
35
+ - **Styling**: CSS modules, Tailwind CSS integration
36
+ - **Swizzling**: Customize theme components
37
+ - **Plugins**: Custom plugin development
38
+
39
+ ## Quick Start
40
+
41
+ ### Installation
42
+
43
+ ```bash
44
+ npx create-docusaurus@latest my-website classic --typescript
45
+ cd my-website
46
+ npm start
47
+ ```
48
+
49
+ ### Project Structure
50
+
51
+ ```
52
+ my-website/
53
+ ├── docs/ # Documentation pages
54
+ │ ├── intro.md
55
+ │ └── tutorial/
56
+ ├── blog/ # Blog posts (optional)
57
+ │ └── 2024-01-01-post.md
58
+ ├── src/
59
+ │ ├── components/ # Custom React components
60
+ │ ├── css/ # Custom styles
61
+ │ └── pages/ # Standalone pages
62
+ ├── static/ # Static assets
63
+ │ └── img/
64
+ ├── docusaurus.config.ts # Main configuration
65
+ ├── sidebars.ts # Sidebar configuration
66
+ └── package.json
67
+ ```
68
+
69
+ ## Configuration
70
+
71
+ ### Basic Configuration
72
+
73
+ ```typescript
74
+ // docusaurus.config.ts
75
+ import {Config} from '@docusaurus/types';
76
+
77
+ const config: Config = {
78
+ title: 'My Project',
79
+ tagline: 'Documentation made easy',
80
+ url: 'https://myproject.com',
81
+ baseUrl: '/',
82
+
83
+ // GitHub Pages deployment config
84
+ organizationName: 'facebook',
85
+ projectName: 'docusaurus',
86
+
87
+ // Theme config
88
+ themeConfig: {
89
+ navbar: {
90
+ title: 'My Project',
91
+ logo: {
92
+ alt: 'My Project Logo',
93
+ src: 'img/logo.svg',
94
+ },
95
+ items: [
96
+ {
97
+ type: 'doc',
98
+ docId: 'intro',
99
+ position: 'left',
100
+ label: 'Docs',
101
+ },
102
+ {to: '/blog', label: 'Blog', position: 'left'},
103
+ {
104
+ href: 'https://github.com/facebook/docusaurus',
105
+ label: 'GitHub',
106
+ position: 'right',
107
+ },
108
+ ],
109
+ },
110
+ footer: {
111
+ style: 'dark',
112
+ links: [
113
+ {
114
+ title: 'Docs',
115
+ items: [
116
+ {
117
+ label: 'Tutorial',
118
+ to: '/docs/intro',
119
+ },
120
+ ],
121
+ },
122
+ ],
123
+ copyright: `Copyright © ${new Date().getFullYear()} My Project`,
124
+ },
125
+ },
126
+
127
+ presets: [
128
+ [
129
+ 'classic',
130
+ {
131
+ docs: {
132
+ sidebarPath: './sidebars.ts',
133
+ editUrl: 'https://github.com/facebook/docusaurus/tree/main/',
134
+ },
135
+ blog: {
136
+ showReadingTime: true,
137
+ editUrl: 'https://github.com/facebook/docusaurus/tree/main/',
138
+ },
139
+ theme: {
140
+ customCss: './src/css/custom.css',
141
+ },
142
+ },
143
+ ],
144
+ ],
145
+ };
146
+
147
+ export default config;
148
+ ```
149
+
150
+ ## MDX Content Features
151
+
152
+ ### Admonitions
153
+
154
+ ```markdown
155
+ :::note
156
+ This is a note
157
+ :::
158
+
159
+ :::tip
160
+ This is a tip
161
+ :::
162
+
163
+ :::warning
164
+ This is a warning
165
+ :::
166
+
167
+ :::danger
168
+ This is a danger alert
169
+ :::
170
+
171
+ :::info Custom Title
172
+ This is an info box with a custom title
173
+ :::
174
+ ```
175
+
176
+ ### Code Blocks with Features
177
+
178
+ ```markdown
179
+ \```typescript title="src/components/HelloWorld.tsx" showLineNumbers {1,3-5}
180
+ import React from 'react';
181
+
182
+ export function HelloWorld() {
183
+ return <h1>Hello World!</h1>;
184
+ }
185
+ \```
186
+ ```
187
+
188
+ ### Tabs
189
+
190
+ ```markdown
191
+ import Tabs from '@theme/Tabs';
192
+ import TabItem from '@theme/TabItem';
193
+
194
+ <Tabs>
195
+ <TabItem value="js" label="JavaScript">
196
+ \```js
197
+ const greeting = 'Hello';
198
+ \```
199
+ </TabItem>
200
+ <TabItem value="ts" label="TypeScript">
201
+ \```ts
202
+ const greeting: string = 'Hello';
203
+ \```
204
+ </TabItem>
205
+ </Tabs>
206
+ ```
207
+
208
+ ### Interactive Code Editors
209
+
210
+ ```markdown
211
+ \```jsx live
212
+ function Clock() {
213
+ const [date, setDate] = useState(new Date());
214
+ useEffect(() => {
215
+ const timerID = setInterval(() => setDate(new Date()), 1000);
216
+ return () => clearInterval(timerID);
217
+ }, []);
218
+ return <div>{date.toLocaleTimeString()}</div>;
219
+ }
220
+ \```
221
+ ```
222
+
223
+ ## Plugins
224
+
225
+ ### Essential Plugins
226
+
227
+ ```typescript
228
+ // docusaurus.config.ts
229
+ plugins: [
230
+ // Multiple docs instances
231
+ [
232
+ '@docusaurus/plugin-content-docs',
233
+ {
234
+ id: 'api',
235
+ path: 'api',
236
+ routeBasePath: 'api',
237
+ sidebarPath: './sidebarsApi.ts',
238
+ },
239
+ ],
240
+
241
+ // Sitemap
242
+ [
243
+ '@docusaurus/plugin-sitemap',
244
+ {
245
+ changefreq: 'weekly',
246
+ priority: 0.5,
247
+ },
248
+ ],
249
+
250
+ // Google Analytics
251
+ [
252
+ '@docusaurus/plugin-google-gtag',
253
+ {
254
+ trackingID: 'G-XXXXXXXXXX',
255
+ anonymizeIP: true,
256
+ },
257
+ ],
258
+ ],
259
+ ```
260
+
261
+ ### Mermaid Diagrams
262
+
263
+ ```bash
264
+ npm install @docusaurus/theme-mermaid
265
+ ```
266
+
267
+ ```typescript
268
+ // docusaurus.config.ts
269
+ themes: ['@docusaurus/theme-mermaid'],
270
+ markdown: {
271
+ mermaid: true,
272
+ },
273
+ ```
274
+
275
+ ```markdown
276
+ \```mermaid
277
+ graph TD
278
+ A[Start] -->|Process| B[End]
279
+ \```
280
+ ```
281
+
282
+ ### Search
283
+
284
+ #### Algolia DocSearch
285
+
286
+ ```typescript
287
+ themeConfig: {
288
+ algolia: {
289
+ appId: 'YOUR_APP_ID',
290
+ apiKey: 'YOUR_SEARCH_API_KEY',
291
+ indexName: 'YOUR_INDEX_NAME',
292
+ },
293
+ },
294
+ ```
295
+
296
+ #### Local Search
297
+
298
+ ```bash
299
+ npm install @easyops-cn/docusaurus-search-local
300
+ ```
301
+
302
+ ```typescript
303
+ themes: [
304
+ [
305
+ require.resolve('@easyops-cn/docusaurus-search-local'),
306
+ {
307
+ hashed: true,
308
+ language: ['en', 'zh'],
309
+ },
310
+ ],
311
+ ],
312
+ ```
313
+
314
+ ## Versioning
315
+
316
+ ### Enable Versioning
317
+
318
+ ```bash
319
+ npm run docusaurus docs:version 1.0.0
320
+ ```
321
+
322
+ ### Version Structure
323
+
324
+ ```
325
+ website/
326
+ ├── docs/ # Current version (Next)
327
+ ├── versioned_docs/
328
+ │ ├── version-1.0.0/ # Version 1.0.0
329
+ │ └── version-2.0.0/ # Version 2.0.0
330
+ ├── versioned_sidebars/
331
+ │ ├── version-1.0.0-sidebars.json
332
+ │ └── version-2.0.0-sidebars.json
333
+ └── versions.json # List of versions
334
+ ```
335
+
336
+ ### Version Configuration
337
+
338
+ ```typescript
339
+ themeConfig: {
340
+ navbar: {
341
+ items: [
342
+ {
343
+ type: 'docsVersionDropdown',
344
+ position: 'right',
345
+ },
346
+ ],
347
+ },
348
+ },
349
+ ```
350
+
351
+ ## Internationalization (i18n)
352
+
353
+ ### Configuration
354
+
355
+ ```typescript
356
+ // docusaurus.config.ts
357
+ i18n: {
358
+ defaultLocale: 'en',
359
+ locales: ['en', 'fr', 'es'],
360
+ localeConfigs: {
361
+ en: {
362
+ label: 'English',
363
+ },
364
+ fr: {
365
+ label: 'Français',
366
+ },
367
+ es: {
368
+ label: 'Español',
369
+ },
370
+ },
371
+ },
372
+ ```
373
+
374
+ ### Directory Structure
375
+
376
+ ```
377
+ website/
378
+ ├── i18n/
379
+ │ ├── en/
380
+ │ │ ├── docusaurus-plugin-content-docs/
381
+ │ │ └── docusaurus-theme-classic/
382
+ │ ├── fr/
383
+ │ └── es/
384
+ └── docs/ # Default locale content
385
+ ```
386
+
387
+ ### Build for Specific Locale
388
+
389
+ ```bash
390
+ npm run build -- --locale fr
391
+ ```
392
+
393
+ ## Custom Components
394
+
395
+ ### Create Component
396
+
397
+ ```tsx
398
+ // src/components/FeatureCard.tsx
399
+ import React from 'react';
400
+ import styles from './styles.module.css';
401
+
402
+ export function FeatureCard({title, description, icon}) {
403
+ return (
404
+ <div className={styles.featureCard}>
405
+ <div className={styles.icon}>{icon}</div>
406
+ <h3>{title}</h3>
407
+ <p>{description}</p>
408
+ </div>
409
+ );
410
+ }
411
+ ```
412
+
413
+ ### Use in MDX
414
+
415
+ ```markdown
416
+ ---
417
+ title: Features
418
+ ---
419
+
420
+ import {FeatureCard} from '@site/src/components/FeatureCard';
421
+
422
+ # Our Features
423
+
424
+ <FeatureCard
425
+ title="Fast"
426
+ description="Lightning-fast performance"
427
+ icon="⚡"
428
+ />
429
+ ```
430
+
431
+ ## Deployment
432
+
433
+ ### GitHub Pages
434
+
435
+ ```yaml
436
+ # .github/workflows/deploy.yml
437
+ name: Deploy to GitHub Pages
438
+
439
+ on:
440
+ push:
441
+ branches: [main]
442
+
443
+ jobs:
444
+ deploy:
445
+ runs-on: ubuntu-latest
446
+ steps:
447
+ - uses: actions/checkout@v3
448
+ - uses: actions/setup-node@v3
449
+ with:
450
+ node-version: 18
451
+ - name: Install dependencies
452
+ run: npm ci
453
+ - name: Build website
454
+ run: npm run build
455
+ - name: Deploy to GitHub Pages
456
+ uses: peaceiris/actions-gh-pages@v3
457
+ with:
458
+ github_token: ${{ secrets.GITHUB_TOKEN }}
459
+ publish_dir: ./build
460
+ ```
461
+
462
+ ### Netlify
463
+
464
+ ```toml
465
+ # netlify.toml
466
+ [build]
467
+ command = "npm run build"
468
+ publish = "build"
469
+
470
+ [[redirects]]
471
+ from = "/*"
472
+ to = "/index.html"
473
+ status = 200
474
+ ```
475
+
476
+ ### Vercel
477
+
478
+ ```json
479
+ {
480
+ "buildCommand": "npm run build",
481
+ "outputDirectory": "build"
482
+ }
483
+ ```
484
+
485
+ ## Best Practices
486
+
487
+ ### 1. Organize Content Logically
488
+
489
+ ```
490
+ docs/
491
+ ├── getting-started/
492
+ │ ├── installation.md
493
+ │ └── quick-start.md
494
+ ├── guides/
495
+ │ ├── beginner/
496
+ │ ├── intermediate/
497
+ │ └── advanced/
498
+ └── reference/
499
+ ├── api/
500
+ └── cli/
501
+ ```
502
+
503
+ ### 2. Use Frontmatter
504
+
505
+ ```markdown
506
+ ---
507
+ id: my-doc
508
+ title: My Document
509
+ sidebar_label: Short Label
510
+ sidebar_position: 1
511
+ description: Document description for SEO
512
+ keywords: [docusaurus, documentation, seo]
513
+ ---
514
+ ```
515
+
516
+ ### 3. Leverage MDX
517
+
518
+ ```markdown
519
+ import MyComponent from '@site/src/components/MyComponent';
520
+
521
+ <MyComponent prop="value" />
522
+ ```
523
+
524
+ ### 4. Optimize Images
525
+
526
+ ```markdown
527
+ ![Alt text](./img/photo.jpg)
528
+
529
+ <!-- Or with sizing -->
530
+ <img src={require('./img/photo.jpg').default} width="600" />
531
+ ```
532
+
533
+ ### 5. Add Edit Links
534
+
535
+ ```typescript
536
+ docs: {
537
+ editUrl: 'https://github.com/org/repo/edit/main/',
538
+ },
539
+ ```
540
+
541
+ ## Troubleshooting
542
+
543
+ ### Build Errors
544
+
545
+ ```bash
546
+ # Clear cache
547
+ npm run clear
548
+ npm run build
549
+ ```
550
+
551
+ ### Broken Links
552
+
553
+ ```bash
554
+ # Check for broken links during build
555
+ npm run build -- --debug
556
+ ```
557
+
558
+ ### Port Already in Use
559
+
560
+ ```bash
561
+ PORT=3001 npm start
562
+ ```
563
+
564
+ ## Resources
565
+
566
+ - [Official Docs](https://docusaurus.io/)
567
+ - [Showcase](https://docusaurus.io/showcase)
568
+ - [Discord Community](https://discord.gg/docusaurus)
569
+ - [GitHub](https://github.com/facebook/docusaurus)
570
+
571
+ ## Activation Keywords
572
+
573
+ Ask me about:
574
+ - "How do I set up Docusaurus?"
575
+ - "Docusaurus configuration best practices"
576
+ - "Adding search to Docusaurus"
577
+ - "Docusaurus versioning"
578
+ - "MDX components in Docusaurus"
579
+ - "Deploy Docusaurus to GitHub Pages"
580
+ - "Internationalization in Docusaurus"
581
+ - "Custom Docusaurus themes"