create-dox 0.3.0 → 0.3.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.
|
@@ -43,35 +43,70 @@ import { execSync } from "child_process";
|
|
|
43
43
|
var STARTER_PAGES = {
|
|
44
44
|
"introduction.mdx": `---
|
|
45
45
|
title: Introduction
|
|
46
|
-
description: Welcome to {NAME}
|
|
46
|
+
description: Welcome to {NAME} \u2014 learn what it does, how the docs are organized, and where to start.
|
|
47
|
+
keywords:
|
|
48
|
+
- {NAME}
|
|
49
|
+
- documentation
|
|
50
|
+
- overview
|
|
51
|
+
- getting started
|
|
47
52
|
---
|
|
48
53
|
|
|
49
54
|
## Welcome
|
|
50
55
|
|
|
51
|
-
|
|
56
|
+
Welcome to the **{NAME}** documentation. This is your home base for guides, API
|
|
57
|
+
references, and everything you need to build with {NAME}. The site is powered by
|
|
58
|
+
[Dox](https://github.com/kenny-io/Dox), an agent-native docs platform \u2014 every page
|
|
59
|
+
is served to humans as polished HTML and to AI agents as structured JSON, JSON-LD,
|
|
60
|
+
and Markdown from the same URL, so assistants can read your docs accurately.
|
|
52
61
|
|
|
53
|
-
|
|
62
|
+
## What you'll find here
|
|
63
|
+
|
|
64
|
+
- **Guides** \u2014 step-by-step walkthroughs of common tasks and workflows.
|
|
65
|
+
- **API reference** \u2014 generated from your OpenAPI spec, with a live "Try It" console.
|
|
66
|
+
- **Quickstart** \u2014 install {NAME} and make your first call in a few minutes.
|
|
67
|
+
|
|
68
|
+
## Next steps
|
|
69
|
+
|
|
70
|
+
Start with the [Quickstart](/quickstart) to get {NAME} running, then make this site
|
|
71
|
+
your own by editing \`src/content/introduction.mdx\` and updating the navigation in
|
|
72
|
+
\`docs.json\`. Every change you save is instantly reflected for both readers and agents.
|
|
54
73
|
`,
|
|
55
74
|
"quickstart.mdx": `---
|
|
56
75
|
title: Quickstart
|
|
57
|
-
description:
|
|
76
|
+
description: Install {NAME}, configure your API key, and make your first call in under five minutes.
|
|
77
|
+
keywords:
|
|
78
|
+
- {NAME}
|
|
79
|
+
- quickstart
|
|
80
|
+
- installation
|
|
81
|
+
- getting started
|
|
58
82
|
---
|
|
59
83
|
|
|
60
84
|
## Installation
|
|
61
85
|
|
|
86
|
+
Install {NAME} with your package manager of choice. We recommend pinning the
|
|
87
|
+
version in your project so builds stay reproducible across machines and CI:
|
|
88
|
+
|
|
62
89
|
\`\`\`bash
|
|
63
90
|
npm install {SLUG}
|
|
64
91
|
\`\`\`
|
|
65
92
|
|
|
66
93
|
## Basic usage
|
|
67
94
|
|
|
95
|
+
Import the client and initialize it with your API key. Keep the key in an
|
|
96
|
+
environment variable rather than committing it to source control, so it never
|
|
97
|
+
leaks into your repository or build logs:
|
|
98
|
+
|
|
68
99
|
\`\`\`ts
|
|
69
100
|
import { create } from '{SLUG}'
|
|
70
101
|
|
|
71
|
-
const client = create({ apiKey:
|
|
102
|
+
const client = create({ apiKey: process.env.API_KEY })
|
|
72
103
|
\`\`\`
|
|
73
104
|
|
|
74
|
-
|
|
105
|
+
## What's next
|
|
106
|
+
|
|
107
|
+
That's the basics \u2014 you're ready to build. Explore the guides for common workflows,
|
|
108
|
+
open the API reference to try endpoints against a live "Try It" console, or edit this
|
|
109
|
+
page at \`src/content/quickstart.mdx\` to document your own onboarding flow.
|
|
75
110
|
`
|
|
76
111
|
};
|
|
77
112
|
function buildStarterDocsJson({
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
initGit,
|
|
4
4
|
installDeps,
|
|
5
5
|
scaffold
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-673L75C2.js";
|
|
7
7
|
|
|
8
8
|
// src/migrate/index.ts
|
|
9
9
|
import { mkdirSync as mkdirSync2, copyFileSync as copyFileSync2, readFileSync as readFileSync3, writeFileSync, existsSync as existsSync3, mkdtempSync, rmSync } from "fs";
|
package/dist/index.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
migrateDocs,
|
|
4
4
|
parseGitHubUrl
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-AFJGDIXU.js";
|
|
6
6
|
import {
|
|
7
7
|
logo,
|
|
8
8
|
scaffold,
|
|
9
9
|
slugify,
|
|
10
10
|
success
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-673L75C2.js";
|
|
12
12
|
|
|
13
13
|
// src/index.ts
|
|
14
14
|
import { existsSync as existsSync3, readdirSync as readdirSync2 } from "fs";
|
package/dist/migrate/index.js
CHANGED
package/dist/scaffold.js
CHANGED