@clidey/dory 1.0.7 → 1.9.0

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 (198) hide show
  1. package/README.md +12 -1
  2. package/bin/chat-server.ts +270 -0
  3. package/bin/dist/analytics-server.d.ts +11 -0
  4. package/bin/dist/analytics-server.d.ts.map +1 -0
  5. package/bin/dist/analytics-server.js +121 -0
  6. package/bin/dist/analytics-server.js.map +1 -0
  7. package/bin/dist/automation.d.ts +35 -0
  8. package/bin/dist/automation.d.ts.map +1 -0
  9. package/bin/dist/automation.js +259 -0
  10. package/bin/dist/automation.js.map +1 -0
  11. package/bin/dist/chat-server.d.ts +8 -0
  12. package/bin/dist/chat-server.d.ts.map +1 -0
  13. package/bin/dist/chat-server.js +322 -0
  14. package/bin/dist/chat-server.js.map +1 -0
  15. package/bin/dist/check.d.ts +16 -0
  16. package/bin/dist/check.d.ts.map +1 -0
  17. package/bin/dist/check.js +247 -0
  18. package/bin/dist/check.js.map +1 -0
  19. package/bin/dist/dory.js +252 -402
  20. package/bin/dist/dory.js.map +1 -1
  21. package/bin/dist/i18n-init.d.ts +6 -0
  22. package/bin/dist/i18n-init.d.ts.map +1 -0
  23. package/bin/dist/i18n-init.js +56 -0
  24. package/bin/dist/i18n-init.js.map +1 -0
  25. package/bin/dist/mcp-http.d.ts +8 -0
  26. package/bin/dist/mcp-http.d.ts.map +1 -0
  27. package/bin/dist/mcp-http.js +72 -0
  28. package/bin/dist/mcp-http.js.map +1 -0
  29. package/bin/dist/mcp.d.ts +2 -0
  30. package/bin/dist/mcp.d.ts.map +1 -0
  31. package/bin/dist/mcp.js +81 -0
  32. package/bin/dist/mcp.js.map +1 -0
  33. package/bin/dist/preview-entry.d.ts +2 -0
  34. package/bin/dist/preview-entry.d.ts.map +1 -0
  35. package/bin/dist/preview-entry.js +6 -0
  36. package/bin/dist/preview-entry.js.map +1 -0
  37. package/bin/dist/preview-server.d.ts +5 -0
  38. package/bin/dist/preview-server.d.ts.map +1 -0
  39. package/bin/dist/preview-server.js +159 -0
  40. package/bin/dist/preview-server.js.map +1 -0
  41. package/bin/dist/project-config.d.ts +22 -0
  42. package/bin/dist/project-config.d.ts.map +1 -0
  43. package/bin/dist/project-config.js +44 -0
  44. package/bin/dist/project-config.js.map +1 -0
  45. package/dist/index.html +57 -0
  46. package/dist/runtime/dory-runtime.css +2 -0
  47. package/dist/runtime/dory-runtime.html +14 -0
  48. package/dist/runtime/dory-runtime.js +5490 -0
  49. package/docs/api-playground-demo.mdx +119 -0
  50. package/docs/api-reference/asyncapi.json +324 -0
  51. package/docs/api-reference/openapi.json +366 -0
  52. package/docs/api-reference/operations/create.mdx +5 -0
  53. package/docs/api-reference/operations/delete.mdx +5 -0
  54. package/docs/api-reference/operations/get.mdx +5 -0
  55. package/docs/api-reference/operations/update.mdx +5 -0
  56. package/docs/api-reference/websocket-operations/receive-chat-message.mdx +5 -0
  57. package/docs/api-reference/websocket-operations/receive-notifications.mdx +5 -0
  58. package/docs/api-reference/websocket-operations/receive-presence-update.mdx +5 -0
  59. package/docs/api-reference/websocket-operations/send-chat-message.mdx +5 -0
  60. package/docs/api-reference/websocket-operations/send-presence-update.mdx +5 -0
  61. package/docs/assets/dory.jpeg +0 -0
  62. package/docs/components/accordion.mdx +145 -0
  63. package/docs/components/callouts.mdx +134 -0
  64. package/docs/components/cards.mdx +153 -0
  65. package/docs/components/code-blocks.mdx +281 -0
  66. package/docs/components/expandable.mdx +189 -0
  67. package/docs/components/icons.mdx +71 -0
  68. package/docs/components/images.mdx +82 -0
  69. package/docs/components/latex.mdx +148 -0
  70. package/docs/components/layout.mdx +175 -0
  71. package/docs/components/lists.mdx +134 -0
  72. package/docs/components/mermaid.mdx +149 -0
  73. package/docs/components/overview.mdx +81 -0
  74. package/docs/components/source.mdx +130 -0
  75. package/docs/components/steps.mdx +122 -0
  76. package/docs/components/tables.mdx +114 -0
  77. package/docs/components/tags.mdx +179 -0
  78. package/docs/components/typography.mdx +185 -0
  79. package/docs/configuration/analytics.mdx +45 -0
  80. package/docs/configuration/chat.mdx +59 -0
  81. package/docs/configuration/dory-json.mdx +278 -0
  82. package/docs/configuration/embed.mdx +73 -0
  83. package/docs/configuration/fonts.mdx +86 -0
  84. package/docs/configuration/internationalization.mdx +61 -0
  85. package/docs/configuration/navigation.mdx +217 -0
  86. package/docs/configuration/theming.mdx +166 -0
  87. package/docs/dory.json +129 -0
  88. package/docs/embed-example.html +176 -0
  89. package/docs/favicon.svg +18 -0
  90. package/docs/features.mdx +440 -0
  91. package/docs/getting-started/automation.mdx +76 -0
  92. package/docs/getting-started/configuration.mdx +95 -0
  93. package/docs/getting-started/installation.mdx +88 -0
  94. package/docs/getting-started/quick-start.mdx +53 -0
  95. package/docs/getting-started/whodb-ee-apps.mdx +122 -0
  96. package/docs/introduction.mdx +50 -0
  97. package/docs/logo/logo.svg +18 -0
  98. package/docs/playgrounds/api-playground.mdx +122 -0
  99. package/docs/playgrounds/websocket-playground.mdx +98 -0
  100. package/docs/social-card.png +0 -0
  101. package/docs/social-card.svg +17 -0
  102. package/docs/websocket-playground-demo.mdx +135 -0
  103. package/package.json +23 -17
  104. package/scripts/verify-runtime-parity.mjs +146 -0
  105. package/src/app.css +19 -1
  106. package/src/assets/fonts/HankenGrotesk.ttf +0 -0
  107. package/src/assets/fonts/OFL.txt +94 -0
  108. package/src/components/chat-assistant.tsx +229 -0
  109. package/src/components/dropdown.tsx +3 -3
  110. package/src/components/error-boundary.tsx +2 -2
  111. package/src/components/hooks.tsx +20 -1
  112. package/src/components/navigation.tsx +82 -51
  113. package/src/components/notification.tsx +2 -3
  114. package/src/components/routes.tsx +17 -19
  115. package/src/components/search-index.test.ts +15 -0
  116. package/src/components/search-index.ts +49 -48
  117. package/src/components/search.tsx +208 -104
  118. package/src/components/store.ts +27 -9
  119. package/src/config/mdx-common.ts +11 -0
  120. package/src/config/mdx.ts +10 -11
  121. package/src/embed/loader.ts +0 -3
  122. package/src/embed/types.ts +0 -2
  123. package/src/embed/widget-iframe.ts +19 -21
  124. package/src/embedded-runtime/config.ts +138 -0
  125. package/src/embedded-runtime/index.tsx +680 -0
  126. package/src/embedded-runtime/runtime.html +14 -0
  127. package/src/entry-server.tsx +46 -124
  128. package/src/main.tsx +16 -4
  129. package/src/mdx/accordion.tsx +3 -3
  130. package/src/mdx/api-playground.tsx +18 -16
  131. package/src/mdx/async-api.tsx +2 -2
  132. package/src/mdx/card.tsx +3 -2
  133. package/src/mdx/code.tsx +11 -9
  134. package/src/mdx/fence.tsx +6 -5
  135. package/src/mdx/icon-grid.tsx +4 -1
  136. package/src/mdx/icon-names.test.ts +15 -0
  137. package/src/mdx/icon-names.ts +60 -0
  138. package/src/mdx/icon-source-variants.ts +102 -0
  139. package/src/mdx/icon.tsx +12 -73
  140. package/src/mdx/latex.tsx +3 -2
  141. package/src/mdx/mdx.tsx +1 -1
  142. package/src/mdx/mermaid.tsx +12 -6
  143. package/src/mdx/open-api.tsx +130 -74
  144. package/src/mdx/preprocess.test.ts +16 -0
  145. package/src/mdx/preprocess.ts +61 -0
  146. package/src/mdx/processor.ts +4 -96
  147. package/src/mdx/source.tsx +5 -4
  148. package/src/mdx/specimen.tsx +38 -6
  149. package/src/mdx/tabs.tsx +29 -21
  150. package/src/mdx/text.tsx +9 -9
  151. package/src/mdx/try-it-panel.tsx +284 -0
  152. package/src/mdx/type-scale.tsx +4 -4
  153. package/src/mdx/websocket-playground.tsx +21 -14
  154. package/src/plugins/analytics-injector.ts +8 -0
  155. package/src/plugins/chat-dev-server.ts +32 -0
  156. package/src/plugins/docs-assets.test.ts +25 -0
  157. package/src/plugins/docs-assets.ts +6 -2
  158. package/src/plugins/frontmatter-dev-server.ts +2 -2
  159. package/src/plugins/frontmatter-generator.ts +1 -1
  160. package/src/plugins/html-files-middleware.test.ts +21 -1
  161. package/src/plugins/html-files-middleware.ts +26 -6
  162. package/src/plugins/html-metadata-injector.ts +24 -4
  163. package/src/plugins/llm-txt-dev-server.ts +2 -2
  164. package/src/plugins/llm-txt-generator.ts +21 -4
  165. package/src/plugins/prerender.ts +47 -20
  166. package/src/plugins/robots-generator.ts +1 -1
  167. package/src/plugins/sanitize.ts +1 -1
  168. package/src/plugins/shared.ts +6 -18
  169. package/src/plugins/sitemap-generator.ts +1 -1
  170. package/src/plugins/social-preview.test.ts +71 -0
  171. package/src/plugins/social-preview.ts +87 -0
  172. package/src/plugins/unified-mdx-plugin.ts +1 -1
  173. package/src/theme.scss +630 -207
  174. package/src/types/config.ts +53 -1
  175. package/src/ui/breadcrumb.tsx +17 -0
  176. package/src/ui/docs-header-view.tsx +32 -0
  177. package/src/ui/docs-navigation-view.tsx +69 -0
  178. package/src/ui/docs-page-frame.tsx +50 -0
  179. package/src/ui/dory-mark.tsx +9 -0
  180. package/src/ui/header.tsx +33 -90
  181. package/src/ui/layout.tsx +99 -153
  182. package/src/ui/mobile-navigation.tsx +10 -8
  183. package/src/ui/page-actions.tsx +67 -0
  184. package/src/ui/page-feedback.tsx +50 -0
  185. package/src/ui/page-footer.tsx +23 -0
  186. package/src/ui/prev-next-link.tsx +15 -69
  187. package/src/ui/prev-next-view.tsx +27 -0
  188. package/src/ui/table-of-content-view.tsx +167 -0
  189. package/src/ui/table-of-content.tsx +25 -183
  190. package/src/utils/analytics.test.ts +36 -0
  191. package/src/utils/analytics.ts +35 -0
  192. package/src/utils/colors.ts +7 -0
  193. package/src/utils/content-scope.test.ts +26 -0
  194. package/src/utils/content-scope.ts +39 -0
  195. package/src/utils/search-content.ts +12 -0
  196. package/src/utils/theme.ts +1 -7
  197. package/vite.config.ssr.ts +3 -3
  198. package/vite.config.ts +21 -15
@@ -0,0 +1,440 @@
1
+ ---
2
+ title: 'Features'
3
+ description: 'Overview of available components and features'
4
+ ---
5
+
6
+ ## Headings Examples
7
+
8
+ ```mdx
9
+ # Heading 1
10
+ ```
11
+ # Heading 1
12
+
13
+ ```mdx
14
+ ## Heading 2
15
+ ```
16
+ # Heading 2
17
+
18
+ ```mdx
19
+ ### Heading 3
20
+ ```
21
+ # Heading 3
22
+ ```mdx
23
+ #### Heading 4
24
+ ```
25
+ # Heading 4
26
+ ```mdx
27
+ ##### Heading 5
28
+ ```
29
+ # Heading 5
30
+ ```mdx
31
+ ###### Heading 6
32
+ ```
33
+ # Heading 6
34
+
35
+ <br />
36
+
37
+ ## Lists Examples
38
+
39
+ ```mdx
40
+ - List item 1
41
+ - List item 2
42
+ - List item 3
43
+ ```
44
+
45
+ - List item 1
46
+ - List item 2
47
+ - List item 3
48
+
49
+ ```mdx
50
+ 1. List item 1
51
+ 2. List item 2
52
+ 3. List item 3
53
+ ```
54
+
55
+ 1. List item 1
56
+ 2. List item 2
57
+ 3. List item 3
58
+
59
+
60
+
61
+ <br />
62
+
63
+ ### Images
64
+
65
+ ```mdx
66
+ <img src="./assets/dory.jpeg" alt="Example image" className="object-cover w-64 h-64" />
67
+ ```
68
+
69
+ <img src="./assets/dory.jpeg" alt="Example image" className="object-cover w-64 h-64" />
70
+
71
+
72
+ <br />
73
+ <br />
74
+ <br />
75
+
76
+ ## Code Components
77
+
78
+ ### Code Block
79
+ ```typescript
80
+ function example() {
81
+ return "Hello World";
82
+ }
83
+ ```
84
+
85
+ ### Code Group Block
86
+
87
+ <CodeGroup>
88
+ ```typescript
89
+ function example(): string {
90
+ return "Hello World";
91
+ }
92
+ ```
93
+ ```javascript
94
+ function example() {
95
+ return "Hello World";
96
+ }
97
+ ```
98
+ </CodeGroup>
99
+
100
+
101
+ <br />
102
+ <br />
103
+ <br />
104
+
105
+
106
+ ## Interactive Components
107
+
108
+ ### Mermaid
109
+
110
+ ```mdx
111
+ mermaid
112
+ graph TD
113
+
114
+ %% Main Start
115
+ Start([Start Process]) --> Validate[Validate Input]
116
+
117
+ %% Decision Point
118
+ Validate -->|Valid| ProcessData{Is Data Clean?}
119
+ Validate -->|Invalid| Error[Show Error Message]
120
+
121
+ %% Clean Data Branch
122
+ ProcessData -->|Yes| Clean[Clean Data]
123
+ Clean --> Analyze[Analyze Data]
124
+
125
+ %% Dirty Data Branch
126
+ ProcessData -->|No| Notify[Notify User]
127
+ Notify --> Wait[Wait for Input]
128
+ Wait --> Validate
129
+
130
+ %% Parallel Branches After Analysis
131
+ Analyze --> Split1 & Split2
132
+
133
+ subgraph Parallel Tasks
134
+ Split1[Generate Report] --> Merge
135
+ Split2[Update Dashboard] --> Merge
136
+ end
137
+
138
+ Merge --> Decision2{Is More Input Needed?}
139
+ Decision2 -->|Yes| WaitMore[Wait for More Input]
140
+ WaitMore --> Validate
141
+ Decision2 -->|No| End([End Process])
142
+
143
+ %% Style and Class Definitions
144
+ classDef decision fill:#f9f,stroke:#333,stroke-width:2px;
145
+ class ProcessData,Decision2 decision;
146
+
147
+ ```
148
+
149
+ <strong>
150
+ <p>Note: Mermaid should be inside a code block with type "mermaid"</p>
151
+ </strong>
152
+
153
+ ```mermaid
154
+ graph TD
155
+
156
+ %% Main Start
157
+ Start([Start Process]) --> Validate[Validate Input]
158
+
159
+ %% Decision Point
160
+ Validate -->|Valid| ProcessData{Is Data Clean?}
161
+ Validate -->|Invalid| Error[Show Error Message]
162
+
163
+ %% Clean Data Branch
164
+ ProcessData -->|Yes| Clean[Clean Data]
165
+ Clean --> Analyze[Analyze Data]
166
+
167
+ %% Dirty Data Branch
168
+ ProcessData -->|No| Notify[Notify User]
169
+ Notify --> Wait[Wait for Input]
170
+ Wait --> Validate
171
+
172
+ %% Parallel Branches After Analysis
173
+ Analyze --> Split1 & Split2
174
+
175
+ subgraph Parallel Tasks
176
+ Split1[Generate Report] --> Merge
177
+ Split2[Update Dashboard] --> Merge
178
+ end
179
+
180
+ Merge --> Decision2{Is More Input Needed?}
181
+ Decision2 -->|Yes| WaitMore[Wait for More Input]
182
+ WaitMore --> Validate
183
+ Decision2 -->|No| End([End Process])
184
+
185
+ %% Style and Class Definitions
186
+ classDef decision fill:#f9f,stroke:#333,stroke-width:2px;
187
+ class ProcessData,Decision2 decision;
188
+
189
+ ```
190
+
191
+ ### Accordion
192
+
193
+ ```mdx
194
+ <AccordionGroup>
195
+ <Accordion title="First Section" icon="FileText">
196
+ This is the content of the first accordion section.
197
+ </Accordion>
198
+ <Accordion title="Second Section" icon="Code">
199
+ This is the content of the second accordion section.
200
+ </Accordion>
201
+ </AccordionGroup>
202
+ ```
203
+
204
+ <AccordionGroup>
205
+ <Accordion title="First Section" icon="FileText">
206
+ This is the content of the first accordion section.
207
+ </Accordion>
208
+ <Accordion title="Second Section" icon="Code">
209
+ This is the content of the second accordion section.
210
+ </Accordion>
211
+ </AccordionGroup>
212
+
213
+ ### Callouts
214
+
215
+ ```mdx
216
+ <Note>
217
+ This is a note callout with important information.
218
+ </Note>
219
+ ```
220
+
221
+ <Note>
222
+ This is a note callout with important information.
223
+ </Note>
224
+
225
+ ```mdx
226
+ <Warning>
227
+ This is a warning callout for critical information.
228
+ </Warning>
229
+ ```
230
+
231
+ <Warning>
232
+ This is a warning callout for critical information.
233
+ </Warning>
234
+
235
+ ```mdx
236
+ <Info>
237
+ This is an info callout for general information.
238
+ </Info>
239
+ ```
240
+
241
+ <Info>
242
+ This is an info callout for general information.
243
+ </Info>
244
+
245
+ ```mdx
246
+ <Tip>
247
+ This is a tip callout for helpful suggestions.
248
+ </Tip>
249
+ ```
250
+
251
+ <Tip>
252
+ This is a tip callout for helpful suggestions.
253
+ </Tip>
254
+
255
+ ```mdx
256
+ <Check>
257
+ This is a check callout for completed items.
258
+ </Check>
259
+ ```
260
+
261
+ <Check>
262
+ This is a check callout for completed items.
263
+ </Check>
264
+
265
+
266
+ <br />
267
+
268
+ ### Cards
269
+ ```mdx
270
+ <CardGroup cols={2}>
271
+ <Card
272
+ title="Example Card"
273
+ description="This is an example card component with an icon and title."
274
+ icon="FileText"
275
+ href="#"
276
+ />
277
+ <Card
278
+ title="Another Card"
279
+ description="This is another example card with different content."
280
+ icon="Code"
281
+ href="#"
282
+ />
283
+ </CardGroup>
284
+ ```
285
+
286
+ <CardGroup cols={2}>
287
+ <Card
288
+ title="Example Card"
289
+ description="This is an example card component with an icon and title."
290
+ icon="FileText"
291
+ href="#"
292
+ />
293
+ <Card
294
+ title="Another Card"
295
+ description="This is another example card with different content."
296
+ icon="Code"
297
+ href="#"
298
+ />
299
+ </CardGroup>
300
+
301
+ <br />
302
+
303
+ ### Expandable
304
+
305
+ ```mdx
306
+ <Expandable title="Click to Expand">
307
+ This is an expandable section that can be toggled.
308
+ </Expandable>
309
+ ```
310
+
311
+ <Expandable title="Click to Expand">
312
+ This is an expandable section that can be toggled.
313
+ </Expandable>
314
+
315
+ ### Source
316
+
317
+ ```mdx
318
+ <Source url="https://github.com/clidey/dory" paths={[
319
+ { path: "src/mdx/source.tsx", range: "1-46" },
320
+ { path: "docs/features.mdx", range: "318-322" },
321
+ ]} />
322
+ ```
323
+
324
+ <Source url="https://github.com/clidey/dory" paths={[
325
+ { path: "src/mdx/source.tsx", range: "1-46" },
326
+ { path: "docs/features.mdx", range: "318-322" },
327
+ ]} />
328
+
329
+ <br />
330
+ <br />
331
+ <br />
332
+
333
+
334
+ ## Special Components
335
+
336
+ ### Grids
337
+
338
+ #### Rows
339
+ ```mdx
340
+ <Row cols={2}>
341
+ <Icon icon="FileText" />
342
+ <Icon icon="CheckCircle" />
343
+ </Row>
344
+ ```
345
+
346
+ <Row cols={2}>
347
+ <Icon icon="FileText" />
348
+ <Icon icon="CheckCircle" />
349
+ </Row>
350
+
351
+ <br />
352
+
353
+ #### Columns
354
+
355
+ ```mdx
356
+ <Col>
357
+ <Icon icon="FileText" />
358
+ <Icon icon="FileText" />
359
+ </Col>
360
+ ```
361
+
362
+ <Col>
363
+ <Icon icon="FileText" />
364
+ <Icon icon="FileText" />
365
+ </Col>
366
+
367
+ <br />
368
+ <br />
369
+ <br />
370
+
371
+ ### Latex
372
+
373
+ ```mdx
374
+ <Latex>
375
+ E = mc^2
376
+ </Latex>
377
+ ```
378
+
379
+ <Latex>
380
+ E = mc^2
381
+ </Latex>
382
+
383
+ <br />
384
+ <br />
385
+ <br />
386
+
387
+ ### Tables
388
+
389
+ ```mdx
390
+ | Property | Description |
391
+ | -------- | ------------------------------------- |
392
+ | Name | Full name of user |
393
+ | Age | Reported age |
394
+ | Joined | Whether the user joined the community |
395
+ ```
396
+
397
+ | Property | Description |
398
+ | -------- | ------------------------------------- |
399
+ | Name | Full name of user |
400
+ | Age | Reported age |
401
+ | Joined | Whether the user joined the community |
402
+
403
+
404
+ ### Steps
405
+
406
+ ```mdx
407
+ <Steps>
408
+ <Step title="First Step">
409
+ This is the first step in the process.
410
+ </Step>
411
+ <Step title="Second Step">
412
+ This is the second step in the process.
413
+ </Step>
414
+ </Steps>
415
+ ```
416
+
417
+ <Steps>
418
+ <Step title="First Step">
419
+ This is the first step in the process.
420
+ </Step>
421
+ <Step title="Second Step">
422
+ This is the second step in the process.
423
+ </Step>
424
+ </Steps>
425
+
426
+ ### Icons
427
+
428
+ ```mdx
429
+ <Col rows={2}>
430
+ <Icon icon="Code" />
431
+ <Icon icon="FileText" />
432
+ <Icon icon="CheckCircle" />
433
+ </Col>
434
+ ```
435
+
436
+ <Row cols={3}>
437
+ <Icon icon="Code" />
438
+ <Icon icon="FileText" />
439
+ <Icon icon="CheckCircle" />
440
+ </Row>
@@ -0,0 +1,76 @@
1
+ ---
2
+ title: 'CLI and MCP automation'
3
+ description: 'Build, inspect, capture, and iterate on Dory documentation from a CLI or MCP client.'
4
+ ---
5
+
6
+ # CLI and MCP automation
7
+
8
+ Dory can expose a local documentation project to an MCP client. The client can inspect `dory.json`, read and write MDX pages, validate compilation, build the site, and capture screenshots of the result.
9
+
10
+ ## Connect an MCP client
11
+
12
+ From the directory containing `dory.json`, run:
13
+
14
+ ```bash
15
+ dory mcp config
16
+ ```
17
+
18
+ Add the printed `mcpServers.dory` entry to your MCP client's configuration. It pins the current project with `DORY_PROJECT_ROOT`, so the client does not need to launch from that directory. To start it directly:
19
+
20
+ ```bash
21
+ dory mcp serve --project /path/to/docs-project
22
+ ```
23
+
24
+ The server uses stdio. Its stdout carries MCP messages; build logs are returned inside tool results.
25
+
26
+ ## Connect to hosted documentation
27
+
28
+ A Dory site served with `dory preview` also exposes a public, read-only Streamable HTTP MCP endpoint at `/mcp` (or `/docs/mcp` when `basePath` is `/docs`). It provides `site_guide`, `list_pages`, `search_docs`, and `read_page`. These tools read only files in the built `dist/` directory. The local stdio MCP server above remains the way to write pages, build, and take screenshots.
29
+
30
+ Add the endpoint once in your MCP client:
31
+
32
+ ```bash
33
+ codex mcp add whodb-docs --url https://docs.whodb.com/mcp
34
+ claude mcp add --transport http whodb-docs https://docs.whodb.com/mcp
35
+ ```
36
+
37
+ Replace the example URL with your Dory site. If the docs run behind a reverse proxy, forward `/mcp` to the Dory preview server. Its `dory.json` `url` must match the public hostname; for an additional preview hostname, set `DORY_MCP_ALLOWED_HOSTS` to a comma-separated list. The endpoint rejects other hostnames and cross-origin browser requests.
38
+
39
+ You can also give a browsing agent just the documentation URL. Dory advertises `llms.txt` in its HTML, with links to the published `.mdx` pages and `llms-full.txt`. MCP clients still need the one-time connector command above before they can call MCP tools.
40
+
41
+ ## Build and review loop
42
+
43
+ Ask the MCP client to call `dory_guide` first. A typical loop is:
44
+
45
+ 1. `dory_project` reads the site configuration and page list.
46
+ 2. `dory_reference` provides Dory's packaged component and configuration guides.
47
+ 3. `dory_read_page` and `dory_write_page` update the relevant MDX.
48
+ 4. `dory_verify_page` checks MDX compilation.
49
+ 5. `dory_check` catches broken navigation and links, then `dory_build` generates the site.
50
+ 6. `dory_screenshot` captures a route in light and dark themes; review the images and repeat as needed.
51
+
52
+ The same operations are available from the CLI:
53
+
54
+ ```bash
55
+ dory inspect
56
+ dory reference components/cards.mdx
57
+ dory check
58
+ dory verify:content --file getting-started/quick-start.mdx
59
+ dory build
60
+ dory screenshot --route /getting-started/quick-start --theme light
61
+ dory screenshot --route /getting-started/quick-start --theme dark --width 390 --height 844
62
+ ```
63
+
64
+ Screenshot capture uses Chrome or Chromium. Set `DORY_CHROME_PATH` if the browser is outside the standard installation paths. Screenshots are written as PNG files under `.dory/screenshots/`; `--output` must stay in that directory.
65
+
66
+ ## Discover published MDX from one URL
67
+
68
+ Dory sites advertise their `llms.txt` index in the page HTML. The index links to every navigation page's published `.mdx` source and to `llms-full.txt` for combined text. Give a hosted site URL to the CLI or MCP client:
69
+
70
+ ```bash
71
+ dory discover https://docs.example.com
72
+ ```
73
+
74
+ The `dory_discover_site` MCP tool returns the index and MDX URLs. `dory_read_remote_page` retrieves an individual published MDX page. For sites hosted under a path such as `/docs`, the HTML discovery link points to the correct index automatically. Remote discovery accepts public HTTP or HTTPS sites; local and private network addresses are blocked.
75
+
76
+ The server only edits local project pages. Hosted URL discovery reads published source; it does not change the remote site.
@@ -0,0 +1,95 @@
1
+ ---
2
+ title: 'Configuration'
3
+ description: 'Configure your Dory site with dory.json — branding, navigation, fonts, colors, and more.'
4
+ ---
5
+
6
+ # Configuration
7
+
8
+ All Dory configuration lives in a single `dory.json` file at the project root. Pages can live in `docs/`. Here is an example:
9
+
10
+ ```json
11
+ {
12
+ "name": "My Docs",
13
+ "title": "My Docs — Developer Reference",
14
+ "description": "The official documentation for My Project.",
15
+ "url": "https://docs.myproject.com",
16
+ "image": "/og-card.png",
17
+ "twitter": "@myhandle",
18
+ "favicon": "./favicon.svg",
19
+ "colors": {
20
+ "primary": "#6366f1",
21
+ "light": "#818cf8",
22
+ "dark": "#4f46e5"
23
+ },
24
+ "fonts": {
25
+ "family": "Inter",
26
+ "source": "https://fonts.gstatic.com/...",
27
+ "format": "woff2"
28
+ },
29
+ "logo": {
30
+ "light": "./logo/logo.svg",
31
+ "dark": "./logo/logo-dark.svg"
32
+ },
33
+ "navigation": {
34
+ "tabs": [
35
+ {
36
+ "tab": "Documentation",
37
+ "groups": [
38
+ {
39
+ "group": "Getting Started",
40
+ "pages": ["introduction", "installation"]
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "tab": "API Reference",
46
+ "groups": [
47
+ {
48
+ "group": "Endpoints",
49
+ "pages": ["api/create", "api/update", "api/delete"]
50
+ }
51
+ ]
52
+ }
53
+ ]
54
+ },
55
+ "analytics": {
56
+ "posthog": {
57
+ "token": "phc_your_token",
58
+ "apiHost": "https://us.i.posthog.com"
59
+ }
60
+ }
61
+ }
62
+ ```
63
+
64
+ ## Top-Level Fields
65
+
66
+ | Field | Required | Description |
67
+ | --- | --- | --- |
68
+ | `name` | Yes | Site name shown in the header and browser tab. |
69
+ | `title` | No | Custom page title. Defaults to `name`. |
70
+ | `description` | No | Short description used for SEO. |
71
+ | `url` | No | Your site's URL, used for social sharing previews. |
72
+ | `image` | No | Preview image shown when sharing links on social media. |
73
+ | `twitter` | No | Your Twitter/X handle for social meta tags. |
74
+ | `favicon` | Yes | Path to your favicon file (SVG or PNG). |
75
+ | `colors` | No | Brand colors. See [Theming](/configuration/theming). |
76
+ | `fonts` | No | Custom font. See [Fonts](/configuration/fonts). |
77
+ | `logo` | Yes | Logo paths for light and dark mode. |
78
+ | `navigation` | Yes | Navigation structure. See [Navigation](/configuration/navigation). |
79
+ | `analytics` | No | Analytics integrations. See [Analytics](/configuration/analytics). |
80
+ | `i18n` | No | Translated content. See [Languages and versions](/configuration/internationalization). |
81
+ | `versions` | No | Versioned content. See [Languages and versions](/configuration/internationalization). |
82
+ | `embed` | No | Embeddable widget config. See [Embed](/configuration/embed). |
83
+
84
+ ## Configuration Sections
85
+
86
+ <CardGroup cols={2}>
87
+ <Card title="Navigation" href="/configuration/navigation" icon="map" description="Configure tabs, groups, and pages in the sidebar." />
88
+ <Card title="Theming" href="/configuration/theming" icon="palette" description="Set primary, light, and dark brand colors." />
89
+ <Card title="Fonts" href="/configuration/fonts" icon="type" description="Use a custom web font from Google Fonts or any CDN." />
90
+ <Card title="Analytics" href="/configuration/analytics" icon="bar-chart" description="Integrate PostHog for page view tracking." />
91
+ <Card title="Documentation chat" href="/configuration/chat" icon="message-square" description="Configure a server-side model for cited answers." />
92
+ <Card title="Languages and versions" href="/configuration/internationalization" icon="globe" description="Organize localized and versioned pages." />
93
+ <Card title="Embed" href="/configuration/embed" icon="code-2" description="Configure the embeddable widget for external sites." />
94
+ <Card title="Full Reference" href="/configuration/dory-json" icon="file-text" description="Complete dory.json reference with all fields." />
95
+ </CardGroup>
@@ -0,0 +1,88 @@
1
+ ---
2
+ title: 'Installation'
3
+ description: 'Install Dory and start building your documentation site.'
4
+ ---
5
+
6
+ # Installation
7
+
8
+ ## Install the CLI
9
+
10
+ Install Dory globally to use the `dory` command anywhere:
11
+
12
+ <CodeGroup>
13
+ ```bash npm
14
+ npm install -g @clidey/dory
15
+ ```
16
+ ```bash pnpm
17
+ pnpm add -g @clidey/dory
18
+ ```
19
+ ```bash yarn
20
+ yarn global add @clidey/dory
21
+ ```
22
+ </CodeGroup>
23
+
24
+ Verify the installation:
25
+
26
+ ```bash
27
+ dory version
28
+ # Prints the installed Dory version
29
+ ```
30
+
31
+ ## CLI Commands
32
+
33
+ <AccordionGroup>
34
+ <Accordion title="dory init" icon="plus">
35
+ Creates a starter `dory.json` and `docs/introduction.mdx` in the current directory.
36
+ </Accordion>
37
+ <Accordion title="dory dev" icon="play">
38
+ Starts a live preview and reloads when your documentation changes.
39
+ </Accordion>
40
+ <Accordion title="dory check" icon="check">
41
+ Validates navigation, links, assets, anchors, and page metadata across the site.
42
+ </Accordion>
43
+ <Accordion title="dory build" icon="hammer">
44
+ Compiles your MDX files and outputs a static site to the `dist/` directory.
45
+
46
+ ```bash
47
+ dory build
48
+ ```
49
+
50
+ This reads your `dory.json`, processes all your pages, and produces a fully static site ready to deploy.
51
+ </Accordion>
52
+ <Accordion title="dory preview" icon="eye">
53
+ Serves a previously built site locally so you can review it before deploying.
54
+
55
+ ```bash
56
+ dory preview
57
+ # Serving dist/ at http://localhost:3000
58
+ ```
59
+
60
+ <Warning>
61
+ Run `dory build` before `dory preview`. The preview command serves the built output, not the source files.
62
+ </Warning>
63
+ </Accordion>
64
+ <Accordion title="dory version" icon="info">
65
+ Prints the installed version of Dory.
66
+
67
+ ```bash
68
+ dory version
69
+ # Prints the installed Dory version
70
+ ```
71
+ </Accordion>
72
+ </AccordionGroup>
73
+
74
+ ## Project Structure
75
+
76
+ A Dory project has this structure:
77
+
78
+ ```
79
+ my-docs/
80
+ ├── dory.json # Site configuration (required)
81
+ └── docs/
82
+ ├── logo.svg # Starter logo
83
+ └── introduction.mdx # Your first page
84
+ ```
85
+
86
+ <Note>
87
+ Run Dory commands from the folder containing `dory.json`. Put MDX pages and assets in `docs/`. Existing flat projects with pages beside `dory.json` still work.
88
+ </Note>