@clidey/dory 1.0.8 → 1.10.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.
- package/README.md +59 -164
- package/bin/chat-server.ts +270 -0
- package/bin/dist/analytics-server.d.ts +11 -0
- package/bin/dist/analytics-server.d.ts.map +1 -0
- package/bin/dist/analytics-server.js +121 -0
- package/bin/dist/analytics-server.js.map +1 -0
- package/bin/dist/automation.d.ts +35 -0
- package/bin/dist/automation.d.ts.map +1 -0
- package/bin/dist/automation.js +259 -0
- package/bin/dist/automation.js.map +1 -0
- package/bin/dist/chat-server.d.ts +8 -0
- package/bin/dist/chat-server.d.ts.map +1 -0
- package/bin/dist/chat-server.js +322 -0
- package/bin/dist/chat-server.js.map +1 -0
- package/bin/dist/check.d.ts +16 -0
- package/bin/dist/check.d.ts.map +1 -0
- package/bin/dist/check.js +247 -0
- package/bin/dist/check.js.map +1 -0
- package/bin/dist/dependency-overlay.d.ts +7 -0
- package/bin/dist/dependency-overlay.d.ts.map +1 -0
- package/bin/dist/dependency-overlay.js +137 -0
- package/bin/dist/dependency-overlay.js.map +1 -0
- package/bin/dist/dory.js +254 -402
- package/bin/dist/dory.js.map +1 -1
- package/bin/dist/i18n-init.d.ts +6 -0
- package/bin/dist/i18n-init.d.ts.map +1 -0
- package/bin/dist/i18n-init.js +56 -0
- package/bin/dist/i18n-init.js.map +1 -0
- package/bin/dist/mcp-http.d.ts +8 -0
- package/bin/dist/mcp-http.d.ts.map +1 -0
- package/bin/dist/mcp-http.js +72 -0
- package/bin/dist/mcp-http.js.map +1 -0
- package/bin/dist/mcp.d.ts +2 -0
- package/bin/dist/mcp.d.ts.map +1 -0
- package/bin/dist/mcp.js +81 -0
- package/bin/dist/mcp.js.map +1 -0
- package/bin/dist/preview-entry.d.ts +2 -0
- package/bin/dist/preview-entry.d.ts.map +1 -0
- package/bin/dist/preview-entry.js +6 -0
- package/bin/dist/preview-entry.js.map +1 -0
- package/bin/dist/preview-server.d.ts +5 -0
- package/bin/dist/preview-server.d.ts.map +1 -0
- package/bin/dist/preview-server.js +146 -0
- package/bin/dist/preview-server.js.map +1 -0
- package/bin/dist/preview-static.d.ts +7 -0
- package/bin/dist/preview-static.d.ts.map +1 -0
- package/bin/dist/preview-static.js +70 -0
- package/bin/dist/preview-static.js.map +1 -0
- package/bin/dist/project-config.d.ts +22 -0
- package/bin/dist/project-config.d.ts.map +1 -0
- package/bin/dist/project-config.js +44 -0
- package/bin/dist/project-config.js.map +1 -0
- package/dist/index.html +57 -0
- package/dist/runtime/dory-runtime.css +2 -0
- package/dist/runtime/dory-runtime.html +14 -0
- package/dist/runtime/dory-runtime.js +5490 -0
- package/docs/api-playground-demo.mdx +119 -0
- package/docs/api-reference/asyncapi.json +324 -0
- package/docs/api-reference/openapi.json +366 -0
- package/docs/api-reference/operations/create.mdx +5 -0
- package/docs/api-reference/operations/delete.mdx +5 -0
- package/docs/api-reference/operations/get.mdx +5 -0
- package/docs/api-reference/operations/update.mdx +5 -0
- package/docs/api-reference/websocket-operations/receive-chat-message.mdx +5 -0
- package/docs/api-reference/websocket-operations/receive-notifications.mdx +5 -0
- package/docs/api-reference/websocket-operations/receive-presence-update.mdx +5 -0
- package/docs/api-reference/websocket-operations/send-chat-message.mdx +5 -0
- package/docs/api-reference/websocket-operations/send-presence-update.mdx +5 -0
- package/docs/assets/dory.jpeg +0 -0
- package/docs/components/accordion.mdx +145 -0
- package/docs/components/callouts.mdx +134 -0
- package/docs/components/cards.mdx +153 -0
- package/docs/components/code-blocks.mdx +281 -0
- package/docs/components/expandable.mdx +189 -0
- package/docs/components/icons.mdx +71 -0
- package/docs/components/images.mdx +82 -0
- package/docs/components/latex.mdx +148 -0
- package/docs/components/layout.mdx +178 -0
- package/docs/components/lists.mdx +134 -0
- package/docs/components/mermaid.mdx +149 -0
- package/docs/components/overview.mdx +81 -0
- package/docs/components/source.mdx +130 -0
- package/docs/components/steps.mdx +122 -0
- package/docs/components/tables.mdx +114 -0
- package/docs/components/tags.mdx +179 -0
- package/docs/components/typography.mdx +185 -0
- package/docs/configuration/analytics.mdx +45 -0
- package/docs/configuration/chat.mdx +59 -0
- package/docs/configuration/dory-json.mdx +278 -0
- package/docs/configuration/embed.mdx +73 -0
- package/docs/configuration/fonts.mdx +86 -0
- package/docs/configuration/internationalization.mdx +61 -0
- package/docs/configuration/navigation.mdx +217 -0
- package/docs/configuration/theming.mdx +166 -0
- package/docs/contributing.mdx +47 -0
- package/docs/dory.json +136 -0
- package/docs/embed-example.html +176 -0
- package/docs/favicon.svg +18 -0
- package/docs/features.mdx +440 -0
- package/docs/getting-started/automation.mdx +76 -0
- package/docs/getting-started/configuration.mdx +95 -0
- package/docs/getting-started/custom-components.mdx +60 -0
- package/docs/getting-started/installation.mdx +88 -0
- package/docs/getting-started/quick-start.mdx +53 -0
- package/docs/introduction.mdx +50 -0
- package/docs/logo/logo.svg +18 -0
- package/docs/playgrounds/api-playground.mdx +122 -0
- package/docs/playgrounds/websocket-playground.mdx +98 -0
- package/docs/social-card.png +0 -0
- package/docs/social-card.svg +17 -0
- package/docs/websocket-playground-demo.mdx +135 -0
- package/package.json +23 -17
- package/scripts/verify-component-examples.mjs +126 -0
- package/scripts/verify-runtime-parity.mjs +147 -0
- package/src/app.css +22 -1
- package/src/assets/fonts/HankenGrotesk.ttf +0 -0
- package/src/assets/fonts/OFL.txt +94 -0
- package/src/components/chat-assistant.tsx +229 -0
- package/src/components/dropdown.tsx +3 -3
- package/src/components/error-boundary.tsx +2 -2
- package/src/components/hooks.tsx +20 -1
- package/src/components/navigation.tsx +82 -51
- package/src/components/notification.tsx +2 -3
- package/src/components/routes.tsx +17 -19
- package/src/components/search-index.test.ts +15 -0
- package/src/components/search-index.ts +49 -48
- package/src/components/search.tsx +208 -104
- package/src/components/store.ts +27 -9
- package/src/config/mdx-common.ts +11 -0
- package/src/config/mdx.ts +10 -11
- package/src/embed/loader.ts +0 -3
- package/src/embed/types.ts +0 -2
- package/src/embed/widget-iframe.ts +19 -21
- package/src/embedded-runtime/config.ts +138 -0
- package/src/embedded-runtime/index.tsx +680 -0
- package/src/embedded-runtime/runtime.html +14 -0
- package/src/entry-server.tsx +46 -124
- package/src/main.tsx +17 -5
- package/src/mdx/accordion.tsx +3 -3
- package/src/mdx/api-playground.tsx +18 -16
- package/src/mdx/async-api.tsx +2 -2
- package/src/mdx/card.tsx +3 -2
- package/src/mdx/code.tsx +11 -9
- package/src/mdx/fence.tsx +6 -5
- package/src/mdx/icon-grid.tsx +4 -1
- package/src/mdx/icon-names.test.ts +15 -0
- package/src/mdx/icon-names.ts +60 -0
- package/src/mdx/icon-source-variants.ts +102 -0
- package/src/mdx/icon.tsx +12 -73
- package/src/mdx/latex.test.ts +38 -0
- package/src/mdx/latex.tsx +42 -64
- package/src/mdx/mdx.tsx +1 -1
- package/src/mdx/mermaid.tsx +12 -6
- package/src/mdx/open-api.tsx +130 -74
- package/src/mdx/preprocess.test.ts +16 -0
- package/src/mdx/preprocess.ts +61 -0
- package/src/mdx/processor.test.ts +135 -37
- package/src/mdx/processor.ts +54 -92
- package/src/mdx/source.tsx +5 -4
- package/src/mdx/specimen.tsx +57 -43
- package/src/mdx/tabs.tsx +32 -21
- package/src/mdx/text.tsx +11 -11
- package/src/mdx/try-it-panel.tsx +284 -0
- package/src/mdx/type-scale.tsx +7 -7
- package/src/mdx/websocket-playground.tsx +21 -14
- package/src/plugins/analytics-injector.ts +8 -0
- package/src/plugins/chat-dev-server.ts +32 -0
- package/src/plugins/docs-assets.test.ts +25 -0
- package/src/plugins/docs-assets.ts +6 -2
- package/src/plugins/frontmatter-dev-server.ts +2 -2
- package/src/plugins/frontmatter-generator.ts +1 -1
- package/src/plugins/html-files-middleware.test.ts +21 -1
- package/src/plugins/html-files-middleware.ts +26 -6
- package/src/plugins/html-metadata-injector.ts +24 -4
- package/src/plugins/llm-txt-dev-server.ts +2 -2
- package/src/plugins/llm-txt-generator.ts +21 -4
- package/src/plugins/prerender.ts +47 -20
- package/src/plugins/robots-generator.ts +1 -1
- package/src/plugins/sanitize.ts +6 -5
- package/src/plugins/shared.ts +6 -18
- package/src/plugins/sitemap-generator.ts +1 -1
- package/src/plugins/social-preview.test.ts +71 -0
- package/src/plugins/social-preview.ts +87 -0
- package/src/plugins/unified-mdx-plugin.ts +1 -1
- package/src/theme.scss +630 -207
- package/src/types/config.ts +53 -1
- package/src/ui/breadcrumb.tsx +17 -0
- package/src/ui/docs-header-view.tsx +32 -0
- package/src/ui/docs-navigation-view.tsx +69 -0
- package/src/ui/docs-page-frame.tsx +50 -0
- package/src/ui/dory-mark.tsx +9 -0
- package/src/ui/header.tsx +33 -90
- package/src/ui/layout.tsx +99 -153
- package/src/ui/mobile-navigation.tsx +10 -8
- package/src/ui/page-actions.tsx +67 -0
- package/src/ui/page-feedback.tsx +50 -0
- package/src/ui/page-footer.tsx +23 -0
- package/src/ui/prev-next-link.tsx +15 -69
- package/src/ui/prev-next-view.tsx +27 -0
- package/src/ui/table-of-content-view.tsx +167 -0
- package/src/ui/table-of-content.tsx +25 -183
- package/src/utils/analytics.test.ts +36 -0
- package/src/utils/analytics.ts +35 -0
- package/src/utils/colors.ts +7 -0
- package/src/utils/content-scope.test.ts +26 -0
- package/src/utils/content-scope.ts +39 -0
- package/src/utils/search-content.ts +12 -0
- package/src/utils/theme.ts +1 -7
- package/vite.config.ssr.ts +4 -4
- package/vite.config.ts +22 -16
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Tables'
|
|
3
|
+
description: 'Responsive tables with styled headers and cells using standard Markdown or Table components.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Tables
|
|
7
|
+
|
|
8
|
+
Dory renders tables from standard Markdown syntax and also provides `<Table>`, `<Th>`, and `<Td>` components for programmatic use.
|
|
9
|
+
|
|
10
|
+
## Markdown Tables
|
|
11
|
+
|
|
12
|
+
Use standard Markdown table syntax:
|
|
13
|
+
|
|
14
|
+
<Specimen label="| Name | Type | … |">
|
|
15
|
+
|
|
16
|
+
```mdx
|
|
17
|
+
| Name | Type | Required | Description |
|
|
18
|
+
| --- | --- | --- | --- |
|
|
19
|
+
| `id` | `string` | Yes | Unique identifier. |
|
|
20
|
+
| `name` | `string` | Yes | Display name. |
|
|
21
|
+
| `email` | `string` | No | Email address. |
|
|
22
|
+
| `created_at` | `string` | No | ISO 8601 timestamp. |
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
| Name | Type | Required | Description |
|
|
26
|
+
| --- | --- | --- | --- |
|
|
27
|
+
| `id` | `string` | Yes | Unique identifier. |
|
|
28
|
+
| `name` | `string` | Yes | Display name. |
|
|
29
|
+
| `email` | `string` | No | Email address. |
|
|
30
|
+
| `created_at` | `string` | No | ISO 8601 timestamp. |
|
|
31
|
+
|
|
32
|
+
</Specimen>
|
|
33
|
+
|
|
34
|
+
## Alignment
|
|
35
|
+
|
|
36
|
+
Use colons in the separator row to control column alignment:
|
|
37
|
+
|
|
38
|
+
<Specimen label="| Left | Center | … |">
|
|
39
|
+
|
|
40
|
+
```mdx
|
|
41
|
+
| Left | Center | Right |
|
|
42
|
+
| :--- | :---: | ---: |
|
|
43
|
+
| text | text | text |
|
|
44
|
+
| longer text | longer text | longer text |
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
| Left | Center | Right |
|
|
48
|
+
| :--- | :---: | ---: |
|
|
49
|
+
| text | text | text |
|
|
50
|
+
| longer text | longer text | longer text |
|
|
51
|
+
|
|
52
|
+
</Specimen>
|
|
53
|
+
|
|
54
|
+
## Configuration Reference Table
|
|
55
|
+
|
|
56
|
+
Tables work well for configuration references:
|
|
57
|
+
|
|
58
|
+
<Specimen label="| Field | Type | … |">
|
|
59
|
+
|
|
60
|
+
```mdx
|
|
61
|
+
| Field | Type | Default | Description |
|
|
62
|
+
| --- | --- | --- | --- |
|
|
63
|
+
| `name` | `string` | — | Site name shown in the header. |
|
|
64
|
+
| `colors.primary` | `string` | `#6366f1` | Brand primary color (hex). |
|
|
65
|
+
| `fonts.family` | `string` | System font | Font family name. |
|
|
66
|
+
| `navigation.tabs` | `array` | `[]` | Navigation tab definitions. |
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
| Field | Type | Default | Description |
|
|
70
|
+
| --- | --- | --- | --- |
|
|
71
|
+
| `name` | `string` | — | Site name shown in the header. |
|
|
72
|
+
| `colors.primary` | `string` | `#6366f1` | Brand primary color (hex). |
|
|
73
|
+
| `fonts.family` | `string` | System font | Font family name. |
|
|
74
|
+
| `navigation.tabs` | `array` | `[]` | Navigation tab definitions. |
|
|
75
|
+
|
|
76
|
+
</Specimen>
|
|
77
|
+
|
|
78
|
+
## HTTP Status Code Table
|
|
79
|
+
|
|
80
|
+
<Specimen label="| Status | Code | … |">
|
|
81
|
+
|
|
82
|
+
```mdx
|
|
83
|
+
| Status | Code | Description |
|
|
84
|
+
| --- | --- | --- |
|
|
85
|
+
| OK | `200` | Request succeeded. |
|
|
86
|
+
| Created | `201` | Resource created successfully. |
|
|
87
|
+
| Bad Request | `400` | Invalid parameters or missing required fields. |
|
|
88
|
+
| Unauthorized | `401` | Missing or invalid authentication token. |
|
|
89
|
+
| Forbidden | `403` | Authenticated but lacking permission. |
|
|
90
|
+
| Not Found | `404` | Resource does not exist. |
|
|
91
|
+
| Rate Limited | `429` | Too many requests. Check `Retry-After` header. |
|
|
92
|
+
| Server Error | `500` | Unexpected server error. |
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
| Status | Code | Description |
|
|
96
|
+
| --- | --- | --- |
|
|
97
|
+
| OK | `200` | Request succeeded. |
|
|
98
|
+
| Created | `201` | Resource created successfully. |
|
|
99
|
+
| Bad Request | `400` | Invalid parameters or missing required fields. |
|
|
100
|
+
| Unauthorized | `401` | Missing or invalid authentication token. |
|
|
101
|
+
| Forbidden | `403` | Authenticated but lacking permission. |
|
|
102
|
+
| Not Found | `404` | Resource does not exist. |
|
|
103
|
+
| Rate Limited | `429` | Too many requests. Check `Retry-After` header. |
|
|
104
|
+
| Server Error | `500` | Unexpected server error. |
|
|
105
|
+
|
|
106
|
+
</Specimen>
|
|
107
|
+
|
|
108
|
+
## Long Tables
|
|
109
|
+
|
|
110
|
+
Tables are wrapped in a horizontally scrollable container, so wide tables work on mobile without breaking the layout.
|
|
111
|
+
|
|
112
|
+
<Note>
|
|
113
|
+
Tables are automatically wrapped in `overflow-x-auto` — wide tables scroll horizontally rather than overflowing the page.
|
|
114
|
+
</Note>
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Tags'
|
|
3
|
+
description: 'HTTP method badges and custom color tags for labeling content.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Tags
|
|
7
|
+
|
|
8
|
+
The `<Tag>` component renders colored badges. It has built-in support for HTTP methods and supports custom colors.
|
|
9
|
+
|
|
10
|
+
## HTTP Method Tags
|
|
11
|
+
|
|
12
|
+
Tags automatically apply the correct color for HTTP methods:
|
|
13
|
+
|
|
14
|
+
<Specimen label="<Tag>">
|
|
15
|
+
|
|
16
|
+
```mdx
|
|
17
|
+
<Tag>GET</Tag>
|
|
18
|
+
<Tag>POST</Tag>
|
|
19
|
+
<Tag>PUT</Tag>
|
|
20
|
+
<Tag>DELETE</Tag>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
<Tag>GET</Tag> <Tag>POST</Tag> <Tag>PUT</Tag> <Tag>DELETE</Tag>
|
|
24
|
+
|
|
25
|
+
</Specimen>
|
|
26
|
+
|
|
27
|
+
## HTTP Method Colors
|
|
28
|
+
|
|
29
|
+
| Method | Color |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| `GET` | Sky (blue) |
|
|
32
|
+
| `POST` | Emerald (green) |
|
|
33
|
+
| `PUT` | Amber (orange) |
|
|
34
|
+
| `DELETE` | Rose (red) |
|
|
35
|
+
|
|
36
|
+
## Custom Colors
|
|
37
|
+
|
|
38
|
+
Use the `color` prop for non-HTTP-method tags:
|
|
39
|
+
|
|
40
|
+
<Specimen label="<Tag>">
|
|
41
|
+
|
|
42
|
+
```mdx
|
|
43
|
+
<Tag color="sky">Beta</Tag>
|
|
44
|
+
<Tag color="yellow">New</Tag>
|
|
45
|
+
<Tag color="rose">Deprecated</Tag>
|
|
46
|
+
<Tag color="emerald">Stable</Tag>
|
|
47
|
+
<Tag color="zinc">v1.2.2</Tag>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
<Tag color="sky">Beta</Tag> <Tag color="yellow">New</Tag> <Tag color="rose">Deprecated</Tag> <Tag color="emerald">Stable</Tag> <Tag color="zinc">v1.2.2</Tag>
|
|
51
|
+
|
|
52
|
+
</Specimen>
|
|
53
|
+
|
|
54
|
+
## Tag Variants
|
|
55
|
+
|
|
56
|
+
The `variant` prop controls padding size:
|
|
57
|
+
|
|
58
|
+
<Specimen label="<Tag>">
|
|
59
|
+
|
|
60
|
+
```mdx
|
|
61
|
+
<Tag variant="medium">Default size</Tag>
|
|
62
|
+
<Tag variant="small">Compact</Tag>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
<Tag variant="medium">Default size</Tag> <Tag variant="small">Compact</Tag>
|
|
66
|
+
|
|
67
|
+
</Specimen>
|
|
68
|
+
|
|
69
|
+
## Tags in API Reference
|
|
70
|
+
|
|
71
|
+
Tags are commonly used in API reference documentation to label HTTP methods:
|
|
72
|
+
|
|
73
|
+
<Specimen label="**GET** `path`">
|
|
74
|
+
|
|
75
|
+
```mdx
|
|
76
|
+
**GET** `/api/users` — Retrieve a list of all users.
|
|
77
|
+
|
|
78
|
+
**POST** `/api/users` — Create a new user.
|
|
79
|
+
|
|
80
|
+
**DELETE** `/api/users/:id` — Permanently delete a user.
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**GET** `/api/users` — Retrieve a list of all users.
|
|
84
|
+
|
|
85
|
+
**POST** `/api/users` — Create a new user.
|
|
86
|
+
|
|
87
|
+
**DELETE** `/api/users/:id` — Permanently delete a user.
|
|
88
|
+
|
|
89
|
+
</Specimen>
|
|
90
|
+
|
|
91
|
+
Or with the Tag component on its own line:
|
|
92
|
+
|
|
93
|
+
<Specimen label="<Tag>">
|
|
94
|
+
|
|
95
|
+
```mdx
|
|
96
|
+
<Tag>GET</Tag>
|
|
97
|
+
|
|
98
|
+
`/api/users` — Retrieve a list of all users.
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
<Tag>GET</Tag>
|
|
102
|
+
|
|
103
|
+
`/api/users` — Retrieve a list of all users.
|
|
104
|
+
|
|
105
|
+
</Specimen>
|
|
106
|
+
|
|
107
|
+
## Version and Status Tags
|
|
108
|
+
|
|
109
|
+
<Specimen label="<Tag>">
|
|
110
|
+
|
|
111
|
+
```mdx
|
|
112
|
+
**Authentication** <Tag color="emerald">v2.0</Tag>
|
|
113
|
+
|
|
114
|
+
The new authentication system uses OAuth 2.0 with PKCE.
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Authentication** <Tag color="emerald">v2.0</Tag>
|
|
118
|
+
|
|
119
|
+
The new authentication system uses OAuth 2.0 with PKCE.
|
|
120
|
+
|
|
121
|
+
</Specimen>
|
|
122
|
+
|
|
123
|
+
<Specimen label="<Tag>">
|
|
124
|
+
|
|
125
|
+
```mdx
|
|
126
|
+
**Legacy Auth** <Tag color="rose">Deprecated</Tag>
|
|
127
|
+
|
|
128
|
+
The API key authentication method is deprecated and will be removed in v3.0.
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Legacy Auth** <Tag color="rose">Deprecated</Tag>
|
|
132
|
+
|
|
133
|
+
The API key authentication method is deprecated and will be removed in v3.0.
|
|
134
|
+
|
|
135
|
+
</Specimen>
|
|
136
|
+
|
|
137
|
+
## Chips
|
|
138
|
+
|
|
139
|
+
`<Chip>` is a pill with a brand-colored dot for short, scannable lists such as supported platforms. Wrap several in `<ChipGroup>` so they flow in rows.
|
|
140
|
+
|
|
141
|
+
<Specimen label="<ChipGroup> <Chip>">
|
|
142
|
+
|
|
143
|
+
```mdx
|
|
144
|
+
<ChipGroup>
|
|
145
|
+
<Chip>Postgres</Chip>
|
|
146
|
+
<Chip>MySQL</Chip>
|
|
147
|
+
<Chip href="/components/cards">SQLite</Chip>
|
|
148
|
+
</ChipGroup>
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
<ChipGroup>
|
|
152
|
+
<Chip>Postgres</Chip>
|
|
153
|
+
<Chip>MySQL</Chip>
|
|
154
|
+
<Chip>MariaDB</Chip>
|
|
155
|
+
<Chip>SQLite</Chip>
|
|
156
|
+
<Chip>MongoDB</Chip>
|
|
157
|
+
<Chip>Redis</Chip>
|
|
158
|
+
<Chip>ClickHouse</Chip>
|
|
159
|
+
<Chip>ElasticSearch</Chip>
|
|
160
|
+
<Chip>DuckDB</Chip>
|
|
161
|
+
</ChipGroup>
|
|
162
|
+
|
|
163
|
+
<SpecimenProps>
|
|
164
|
+
|
|
165
|
+
<Prop name="children" type="string">Chip label.</Prop>
|
|
166
|
+
<Prop name="href" type="string">Makes the chip a link.</Prop>
|
|
167
|
+
|
|
168
|
+
</SpecimenProps>
|
|
169
|
+
|
|
170
|
+
</Specimen>
|
|
171
|
+
|
|
172
|
+
## Props Reference
|
|
173
|
+
|
|
174
|
+
| Prop | Type | Default | Description |
|
|
175
|
+
| --- | --- | --- | --- |
|
|
176
|
+
| `children` | `string` | — | Tag label text (e.g. `"GET"`, `"Beta"`). |
|
|
177
|
+
| `color` | `string` | Auto-detected | Badge color: `emerald`, `sky`, `amber`, `rose`, `zinc`, `yellow`. HTTP methods auto-apply color. |
|
|
178
|
+
| `variant` | `string` | `'medium'` | Padding size: `medium` or `small`. |
|
|
179
|
+
| `className` | `string` | — | Additional CSS classes. |
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Typography'
|
|
3
|
+
description: 'Headings, paragraphs, inline code, anchors, and layout helpers for text-heavy pages.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Typography
|
|
7
|
+
|
|
8
|
+
Dory provides standard Markdown typography plus a few layout helpers for rich text pages.
|
|
9
|
+
|
|
10
|
+
## Headings
|
|
11
|
+
|
|
12
|
+
Markdown headings map to the display scale. Inline formatting covers emphasis, code, links, keys and highlights.
|
|
13
|
+
|
|
14
|
+
<Specimen label="# ## ### ####">
|
|
15
|
+
|
|
16
|
+
```mdx
|
|
17
|
+
# Heading 1
|
|
18
|
+
## Heading 2
|
|
19
|
+
### Heading 3
|
|
20
|
+
#### Heading 4
|
|
21
|
+
|
|
22
|
+
**Bold**, *italic*, `inline code`, [a link](https://clidey.github.io/dory/), <kbd>⌘K</kbd>, and <mark>a highlight</mark>.
|
|
23
|
+
|
|
24
|
+
> Blockquotes hold asides and quotes.
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
<TypeScale />
|
|
28
|
+
|
|
29
|
+
**Bold**, *italic*, `inline code`, [a link](https://clidey.github.io/dory/), <kbd>⌘K</kbd>, and <mark>a highlight</mark>.
|
|
30
|
+
|
|
31
|
+
> Blockquotes hold asides and quotes.
|
|
32
|
+
|
|
33
|
+
</Specimen>
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Paragraphs
|
|
38
|
+
|
|
39
|
+
Standard Markdown paragraphs are styled with consistent spacing.
|
|
40
|
+
|
|
41
|
+
This is a paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
42
|
+
|
|
43
|
+
This is a second paragraph, separated by a blank line.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Inline Code
|
|
48
|
+
|
|
49
|
+
Use backticks for inline `code`. This is styled distinctly from surrounding text.
|
|
50
|
+
|
|
51
|
+
<Specimen label="`code`">
|
|
52
|
+
|
|
53
|
+
```mdx
|
|
54
|
+
Use backticks for inline `code`.
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Use backticks for inline `code`.
|
|
58
|
+
|
|
59
|
+
</Specimen>
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Links
|
|
64
|
+
|
|
65
|
+
Use standard Markdown link syntax for hyperlinks:
|
|
66
|
+
|
|
67
|
+
<Specimen label="[link](url)">
|
|
68
|
+
|
|
69
|
+
```mdx
|
|
70
|
+
[Visit the Dory site](https://clidey.github.io/dory/)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
[Visit the Dory site](https://clidey.github.io/dory/)
|
|
74
|
+
|
|
75
|
+
</Specimen>
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Horizontal Rule
|
|
80
|
+
|
|
81
|
+
Use `---` for a horizontal divider:
|
|
82
|
+
|
|
83
|
+
<Specimen label="---">
|
|
84
|
+
|
|
85
|
+
```mdx
|
|
86
|
+
---
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
</Specimen>
|
|
92
|
+
|
|
93
|
+
## Line Break
|
|
94
|
+
|
|
95
|
+
Use `<br/>` to insert explicit line breaks without starting a new paragraph:
|
|
96
|
+
|
|
97
|
+
<Specimen label="<br/>">
|
|
98
|
+
|
|
99
|
+
```mdx
|
|
100
|
+
First line<br/>Second line on a new line
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
First line<br/>Second line on a new line
|
|
104
|
+
|
|
105
|
+
</Specimen>
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Bold and Italic
|
|
110
|
+
|
|
111
|
+
<Specimen label="**bold** *italic*">
|
|
112
|
+
|
|
113
|
+
```mdx
|
|
114
|
+
**Bold text** and *italic text* and ***bold italic***.
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Bold text** and *italic text* and ***bold italic***.
|
|
118
|
+
|
|
119
|
+
</Specimen>
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Row and Col
|
|
124
|
+
|
|
125
|
+
Use `<Row>` and `<Col>` to create multi-column layouts for prose content:
|
|
126
|
+
|
|
127
|
+
<Specimen label="<Row> <Col>">
|
|
128
|
+
|
|
129
|
+
```mdx
|
|
130
|
+
<Row>
|
|
131
|
+
<Col>
|
|
132
|
+
**Left column content**
|
|
133
|
+
|
|
134
|
+
This text appears on the left side.
|
|
135
|
+
</Col>
|
|
136
|
+
<Col>
|
|
137
|
+
**Right column content**
|
|
138
|
+
|
|
139
|
+
This text appears on the right side.
|
|
140
|
+
</Col>
|
|
141
|
+
</Row>
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
<Row>
|
|
145
|
+
<Col>
|
|
146
|
+
**Left column content**
|
|
147
|
+
|
|
148
|
+
This text appears on the left side.
|
|
149
|
+
</Col>
|
|
150
|
+
<Col>
|
|
151
|
+
**Right column content**
|
|
152
|
+
|
|
153
|
+
This text appears on the right side.
|
|
154
|
+
</Col>
|
|
155
|
+
</Row>
|
|
156
|
+
|
|
157
|
+
</Specimen>
|
|
158
|
+
|
|
159
|
+
### Row Props
|
|
160
|
+
|
|
161
|
+
| Prop | Type | Default | Description |
|
|
162
|
+
| --- | --- | --- | --- |
|
|
163
|
+
| `cols` | `number` | `1` | Number of columns in the grid. |
|
|
164
|
+
| `className` | `string` | — | Additional CSS classes. |
|
|
165
|
+
|
|
166
|
+
### Col Props
|
|
167
|
+
|
|
168
|
+
| Prop | Type | Default | Description |
|
|
169
|
+
| --- | --- | --- | --- |
|
|
170
|
+
| `sticky` | `boolean` | `false` | Makes the column sticky on large screens (`xl:sticky top-24`). Useful for code/example columns. |
|
|
171
|
+
| `rows` | `number` | `1` | Number of CSS grid rows this column spans. |
|
|
172
|
+
| `gap` | `number` | `4` | Spacing between items inside the column. |
|
|
173
|
+
|
|
174
|
+
### Sticky Column Example
|
|
175
|
+
|
|
176
|
+
```mdx
|
|
177
|
+
<Row>
|
|
178
|
+
<Col>
|
|
179
|
+
Long prose content that scrolls...
|
|
180
|
+
</Col>
|
|
181
|
+
<Col sticky>
|
|
182
|
+
Code example that stays visible while scrolling.
|
|
183
|
+
</Col>
|
|
184
|
+
</Row>
|
|
185
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Analytics
|
|
3
|
+
description: Send documentation traffic, searches, feedback, engagement, and AI crawler requests to PostHog.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Analytics
|
|
7
|
+
|
|
8
|
+
Dory sends documentation analytics to your PostHog project. There is no Dory analytics account, dashboard, admin password, or local analytics database. If PostHog is not configured, Dory does not collect analytics.
|
|
9
|
+
|
|
10
|
+
## Connect PostHog
|
|
11
|
+
|
|
12
|
+
Add your PostHog project key to `dory.json`:
|
|
13
|
+
|
|
14
|
+
```json
|
|
15
|
+
"analytics": {
|
|
16
|
+
"posthog": {
|
|
17
|
+
"token": "phc_your_project_key",
|
|
18
|
+
"apiHost": "https://us.i.posthog.com"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
| Field | Description |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| `posthog.token` | Public PostHog project key, usually beginning with `phc_`. |
|
|
26
|
+
| `posthog.apiHost` | Your PostHog ingestion host. Defaults to the US cloud host; set your own region or self-hosted host when needed. |
|
|
27
|
+
|
|
28
|
+
Run `dory build` and redeploy after changing `dory.json`. View the resulting events and reports in PostHog. The project key is embedded in the public site; do not put a private PostHog API key in `dory.json`.
|
|
29
|
+
|
|
30
|
+
If your host sets a Content Security Policy and you use a custom `apiHost`, allow that host's event endpoint in `connect-src` and its script asset origin in `script-src`.
|
|
31
|
+
|
|
32
|
+
## What is sent
|
|
33
|
+
|
|
34
|
+
| Source | Events |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| Browser | Page views and page leaves; `docs_search`, `docs_search_result_clicked`, `docs_page_feedback`, `docs_code_copied`, `docs_page_engaged`, and `docs_chat_*` interaction events. |
|
|
37
|
+
| Dory Node server | `docs_page_request` for successful documentation page requests and `docs_ai_request` for requests from recognized AI crawler user agents. |
|
|
38
|
+
|
|
39
|
+
Browser events work on static hosting, including a CDN. Server request events require documentation requests to reach the Dory Node server; a CDN cache hit or direct static-file response cannot be counted by that server. Browser page views and server page requests are separate event types, so use the one that matches the report you want.
|
|
40
|
+
|
|
41
|
+
Use PostHog's browser `$pageview` events for visitor counts. Server request events use a new anonymous ID per request to avoid sending reader identifiers, so their unique-user count does not represent unique readers.
|
|
42
|
+
|
|
43
|
+
Dory does not send chat question or answer text, conversation history, or copied code. Search terms are shortened and likely credentials are redacted before capture. Search terms can still contain personal information, so configure consent and retention in PostHog for your site. AI crawler names come from user-agent headers and are unverified.
|
|
44
|
+
|
|
45
|
+
PostHog browser tracking is disabled during local Vite development so authoring activity does not appear in production reports.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Documentation chat
|
|
3
|
+
description: Add a cited documentation assistant with server-side credentials and strict request limits.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Documentation chat
|
|
7
|
+
|
|
8
|
+
Dory can add an **Ask Dory** assistant to your site. It is optional. The browser sends questions to a same-origin `/api/chat` endpoint; only the server calls your model provider. Answers include links to the documentation sections used as sources. When the docs have no matching source, the assistant says it cannot find the answer.
|
|
9
|
+
|
|
10
|
+
## Configure a model
|
|
11
|
+
|
|
12
|
+
Set these environment variables on the server running `dory dev` or `dory preview`:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
DORY_CHAT_API_KEY=your-server-only-key
|
|
16
|
+
DORY_CHAT_MODEL=gpt-6-luna
|
|
17
|
+
# Optional: an OpenAI-compatible provider endpoint; defaults to https://api.openai.com/v1
|
|
18
|
+
DORY_CHAT_BASE_URL=https://api.openai.com/v1
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
If your existing `.env` uses `OPENAI_API_KEY`, Dory accepts that as a fallback. Set `DORY_CHAT_MODEL` as well; no model is chosen silently.
|
|
22
|
+
|
|
23
|
+
The chosen provider must support the OpenAI-compatible `/chat/completions` API and `max_completion_tokens`. Keep the key in your server's secret manager or an uncommitted `.env` file. **Do not use a `VITE_` prefix** for the key: Vite exposes variables with that prefix to browser code. Dory never puts `DORY_CHAT_API_KEY` in the generated site or sends it to the browser.
|
|
24
|
+
|
|
25
|
+
Run `dory dev` while writing, or `dory build && dory preview` to serve the built site with chat. A static-file host cannot execute `/api/chat`; if you deploy `dist/` to one, put a compatible server endpoint behind the same path. Dory hides the chat button when no backend is configured.
|
|
26
|
+
|
|
27
|
+
When enabled, Ask Dory appears in the documentation search dialog. Readers can switch to chat, choose a suggested question, or select the Ask Dory result above page matches to ask their current search query. Supported answers include citations and documentation-focused follow-up questions. If a question is outside the published docs, Ask Dory says so without attaching an unrelated source and suggests topics from your configured questions instead.
|
|
28
|
+
|
|
29
|
+
To customize the suggested questions for your site, add this optional section to `dory.json`:
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
"chat": {
|
|
33
|
+
"suggestedQuestions": [
|
|
34
|
+
"How do I install the product?",
|
|
35
|
+
"What should I try first?",
|
|
36
|
+
"Explain this page"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Without this section, Dory suggests questions based on your site name. Keep provider keys in the server environment, never in `dory.json`.
|
|
42
|
+
|
|
43
|
+
## Limits and security
|
|
44
|
+
|
|
45
|
+
The backend rejects cross-origin requests, oversized messages, long conversation histories, and requests beyond its limits. The defaults are deliberately conservative:
|
|
46
|
+
|
|
47
|
+
When using `dory dev` on `localhost`, `127.0.0.1`, or `::1`, Dory skips the per-minute and daily request quotas so you can iterate on chat locally. The concurrent-call guard still applies. `dory preview` and deployed servers keep the quotas below.
|
|
48
|
+
|
|
49
|
+
| Environment variable | Default | Purpose |
|
|
50
|
+
| --- | ---: | --- |
|
|
51
|
+
| `DORY_CHAT_PER_MINUTE` | `3` | Requests per IP per minute |
|
|
52
|
+
| `DORY_CHAT_PER_IP_DAY` | `20` | Requests per IP per day |
|
|
53
|
+
| `DORY_CHAT_GLOBAL_DAY` | `100` | Requests across the server per day |
|
|
54
|
+
| `DORY_CHAT_MAX_CONCURRENT` | `2` | Simultaneous model calls across the server |
|
|
55
|
+
| `DORY_CHAT_MAX_OUTPUT_TOKENS` | `500` | Maximum model output tokens |
|
|
56
|
+
|
|
57
|
+
Each request has a 20-second provider timeout. A question can contain at most 600 characters, and at most six previous turns are accepted. The limits above apply **per Node process**; for multiple replicas, enforce shared limits at your reverse proxy or edge as well. Dory uses the connection IP, not an untrusted `X-Forwarded-For` header. If you put the server behind a reverse proxy, configure limits there using its verified client IP.
|
|
58
|
+
|
|
59
|
+
The server retrieves relevant MDX sections and gives only those excerpts to the model. It validates returned source IDs before showing an answer. Model output can still be imperfect, so keep examples and API facts reviewed and use `dory check` in CI.
|