@knowcode/doc-builder 1.4.21 → 1.4.24
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/.claude/settings.local.json +2 -1
- package/CHANGELOG.md +38 -0
- package/README.md +44 -0
- package/assets/css/notion-style.css +3 -6
- package/cli.js +27 -8
- package/html/README.html +4 -2
- package/html/claude-workflow-guide.html +4 -2
- package/html/css/notion-style.css +3 -6
- package/html/documentation-index.html +31 -5
- package/html/guides/authentication-guide.html +377 -0
- package/html/guides/document-standards.html +2 -1
- package/html/guides/documentation-standards.html +519 -0
- package/html/guides/troubleshooting-guide.html +448 -0
- package/html/index.html +4 -2
- package/lib/deploy.js +50 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,44 @@ All notable changes to @knowcode/doc-builder will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.4.24] - 2025-07-21
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Deployment now shows the correct production URL from Vercel
|
|
12
|
+
- Uses Vercel CLI to fetch the actual production alias
|
|
13
|
+
- Shows clean URL like `doc-builder-delta.vercel.app` instead of deployment URL
|
|
14
|
+
|
|
15
|
+
### Background
|
|
16
|
+
- Previously showed deployment URLs like `doc-builder-i02vs7dur-lindsay-1340s-projects.vercel.app`
|
|
17
|
+
- Now queries `vercel project ls` to get the actual production URL
|
|
18
|
+
- Falls back to deployment URL if production URL cannot be determined
|
|
19
|
+
|
|
20
|
+
## [1.4.23] - 2025-07-21
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
- Added npx cache clearing instructions to CLI help
|
|
24
|
+
- Added troubleshooting section to README
|
|
25
|
+
- Created comprehensive troubleshooting guide
|
|
26
|
+
- Documented `npx clear-npx-cache` solution prominently
|
|
27
|
+
|
|
28
|
+
### Background
|
|
29
|
+
- Users frequently encounter npx cache issues causing old versions to run
|
|
30
|
+
- The npx cache doesn't automatically update when new versions are published
|
|
31
|
+
- This causes confusion when bug fixes or new features don't appear
|
|
32
|
+
- Clear documentation helps users resolve this common issue quickly
|
|
33
|
+
|
|
34
|
+
## [1.4.22] - 2025-07-21
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
- Fixed incorrect production URL display after deployment
|
|
38
|
+
- Deployment now shows the actual Vercel URL instead of truncated version
|
|
39
|
+
|
|
40
|
+
### Background
|
|
41
|
+
- The regex pattern was only capturing text before the first hyphen
|
|
42
|
+
- For `doc-builder-delta.vercel.app` it showed `doc.vercel.app`
|
|
43
|
+
- Now properly displays the full production URL returned by Vercel
|
|
44
|
+
- Also handles preview URLs with random suffixes correctly
|
|
45
|
+
|
|
8
46
|
## [1.4.21] - 2025-07-21
|
|
9
47
|
|
|
10
48
|
### Fixed
|
package/README.md
CHANGED
|
@@ -280,6 +280,50 @@ When using Claude Code to generate documentation, it typically follows these pat
|
|
|
280
280
|
- **Review Generated Content**: Always review AI-generated documentation for accuracy
|
|
281
281
|
- **Maintain CLAUDE.md**: Keep project-specific instructions in a CLAUDE.md file for consistent documentation style
|
|
282
282
|
|
|
283
|
+
## Troubleshooting
|
|
284
|
+
|
|
285
|
+
### NPX Cache Issues
|
|
286
|
+
|
|
287
|
+
The npx command caches packages to speed up subsequent runs. However, this can sometimes cause you to run an older version even after updating.
|
|
288
|
+
|
|
289
|
+
**Symptoms:**
|
|
290
|
+
- Running `npx @knowcode/doc-builder` shows an old version number
|
|
291
|
+
- New features aren't available despite updating
|
|
292
|
+
- Changes don't appear after publishing a new version
|
|
293
|
+
|
|
294
|
+
**Solution:**
|
|
295
|
+
```bash
|
|
296
|
+
# Clear the npx cache
|
|
297
|
+
npx clear-npx-cache
|
|
298
|
+
|
|
299
|
+
# Force the latest version
|
|
300
|
+
npx @knowcode/doc-builder@latest
|
|
301
|
+
|
|
302
|
+
# Or specify an exact version
|
|
303
|
+
npx @knowcode/doc-builder@1.4.22
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
**Prevention:**
|
|
307
|
+
- Always use `@latest` when you want the newest version
|
|
308
|
+
- Clear cache periodically when developing/testing new versions
|
|
309
|
+
- Use `npm install` for projects where you need a specific version
|
|
310
|
+
|
|
311
|
+
### Other Common Issues
|
|
312
|
+
|
|
313
|
+
**"Command not found" error**
|
|
314
|
+
- Ensure Node.js 14+ is installed: `node --version`
|
|
315
|
+
- Try with full package name: `npx @knowcode/doc-builder`
|
|
316
|
+
|
|
317
|
+
**Build fails with "No markdown files found"**
|
|
318
|
+
- Check that your docs are in the `docs/` folder (or specified input directory)
|
|
319
|
+
- Ensure files have `.md` extension
|
|
320
|
+
- Use `--input` flag to specify a different directory
|
|
321
|
+
|
|
322
|
+
**Vercel deployment fails**
|
|
323
|
+
- Run `npx @knowcode/doc-builder reset-vercel` to clear settings
|
|
324
|
+
- Ensure Vercel CLI is installed: `npm install -g vercel`
|
|
325
|
+
- Check that the `html/` directory was created by build command
|
|
326
|
+
|
|
283
327
|
## Using in Other Projects
|
|
284
328
|
|
|
285
329
|
### Option 1: NPM Link (Development)
|
|
@@ -974,7 +974,7 @@ tr:hover {
|
|
|
974
974
|
|
|
975
975
|
.content {
|
|
976
976
|
margin-left: 0;
|
|
977
|
-
padding: var(--space-
|
|
977
|
+
padding: var(--space-3) var(--space-4); /* Reduced top/bottom padding on mobile */
|
|
978
978
|
}
|
|
979
979
|
|
|
980
980
|
.menu-toggle {
|
|
@@ -1596,7 +1596,7 @@ tr:hover {
|
|
|
1596
1596
|
/* Sidebar positioning handled in earlier media query */
|
|
1597
1597
|
|
|
1598
1598
|
.content {
|
|
1599
|
-
padding: var(--space-4);
|
|
1599
|
+
padding: var(--space-3) var(--space-4); /* Consistent reduced padding on mobile */
|
|
1600
1600
|
}
|
|
1601
1601
|
|
|
1602
1602
|
.content-inner {
|
|
@@ -1609,10 +1609,7 @@ tr:hover {
|
|
|
1609
1609
|
padding: 0 var(--space-4);
|
|
1610
1610
|
}
|
|
1611
1611
|
|
|
1612
|
-
|
|
1613
|
-
position: relative;
|
|
1614
|
-
top: 0;
|
|
1615
|
-
}
|
|
1612
|
+
/* Keep preview banner fixed on mobile */
|
|
1616
1613
|
|
|
1617
1614
|
/* Keep breadcrumbs fixed on mobile to prevent double spacing */
|
|
1618
1615
|
}
|
package/cli.js
CHANGED
|
@@ -48,6 +48,11 @@ ${chalk.yellow('Quick Start:')}
|
|
|
48
48
|
${chalk.gray('$')} npx @knowcode/doc-builder ${chalk.gray('# Show help and available commands')}
|
|
49
49
|
${chalk.gray('$')} npx @knowcode/doc-builder deploy ${chalk.gray('# Build and deploy to production')}
|
|
50
50
|
${chalk.gray('$')} npx @knowcode/doc-builder build ${chalk.gray('# Build HTML files only')}
|
|
51
|
+
|
|
52
|
+
${chalk.yellow('Troubleshooting npx cache issues:')}
|
|
53
|
+
${chalk.red('If you see an old version after updating:')}
|
|
54
|
+
${chalk.gray('$')} npx clear-npx-cache ${chalk.gray('# Clear the npx cache')}
|
|
55
|
+
${chalk.gray('$')} npx @knowcode/doc-builder@latest ${chalk.gray('# Force latest version')}
|
|
51
56
|
${chalk.gray('$')} npx @knowcode/doc-builder dev ${chalk.gray('# Start development server')}
|
|
52
57
|
|
|
53
58
|
${chalk.yellow('No docs folder yet?')}
|
|
@@ -309,24 +314,38 @@ ${chalk.yellow('Troubleshooting:')}
|
|
|
309
314
|
spinner.start('Deploying to Vercel...');
|
|
310
315
|
// Default to production deployment
|
|
311
316
|
const isProduction = options.prod !== false; // Default true unless explicitly --no-prod
|
|
312
|
-
const
|
|
317
|
+
const result = await deployToVercel(config, isProduction);
|
|
313
318
|
spinner.succeed(`Deployed successfully!`);
|
|
314
319
|
|
|
315
|
-
//
|
|
316
|
-
|
|
320
|
+
// Handle both old and new return formats
|
|
321
|
+
let deployUrl, productionUrl;
|
|
322
|
+
if (typeof result === 'string') {
|
|
323
|
+
// Old format - just a URL string
|
|
324
|
+
deployUrl = result;
|
|
325
|
+
productionUrl = null;
|
|
326
|
+
} else {
|
|
327
|
+
// New format - object with deployUrl and productionUrl
|
|
328
|
+
deployUrl = result.deployUrl;
|
|
329
|
+
productionUrl = result.productionUrl;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
// Use the production URL if available, otherwise show the deployment URL
|
|
333
|
+
const displayUrl = productionUrl || deployUrl;
|
|
317
334
|
|
|
318
335
|
console.log(chalk.green('\n✅ Deployment Complete!\n'));
|
|
319
336
|
|
|
320
337
|
if (isProduction) {
|
|
321
338
|
console.log(chalk.yellow('🌐 Your documentation is live at:'));
|
|
322
|
-
console.log(chalk.cyan.bold(` ${
|
|
339
|
+
console.log(chalk.cyan.bold(` ${displayUrl}`) + chalk.gray(' (Production URL - share this!)'));
|
|
323
340
|
console.log();
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
341
|
+
if (productionUrl && deployUrl && productionUrl !== deployUrl) {
|
|
342
|
+
console.log(chalk.gray('This deployment also created a unique preview URL:'));
|
|
343
|
+
console.log(chalk.gray(` ${deployUrl}`));
|
|
344
|
+
console.log(chalk.gray(' (This URL is specific to this deployment)'));
|
|
345
|
+
}
|
|
327
346
|
} else {
|
|
328
347
|
console.log(chalk.yellow('🔍 Preview deployment created at:'));
|
|
329
|
-
console.log(chalk.cyan(` ${
|
|
348
|
+
console.log(chalk.cyan(` ${deployUrl}`));
|
|
330
349
|
console.log();
|
|
331
350
|
console.log(chalk.gray('To deploy to production, run:'));
|
|
332
351
|
console.log(chalk.gray(' npx @knowcode/doc-builder deploy'));
|
package/html/README.html
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
<div class="header-actions">
|
|
31
31
|
<div class="deployment-info">
|
|
32
|
-
<span class="deployment-date" title="Built with doc-builder v1.4.
|
|
32
|
+
<span class="deployment-date" title="Built with doc-builder v1.4.23">Last updated: Jul 21, 2025, 07:42 PM UTC</span>
|
|
33
33
|
</div>
|
|
34
34
|
|
|
35
35
|
|
|
@@ -86,7 +86,9 @@
|
|
|
86
86
|
<i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Guides
|
|
87
87
|
</a>
|
|
88
88
|
<div class="nav-content" id="nav-guides-1">
|
|
89
|
-
<a href="/guides/
|
|
89
|
+
<a href="/guides/authentication-guide.html" class="nav-item" data-tooltip="This guide explains how to configure and use the built-in authentication feature in @knowcode/doc-builder to protect your documentation with basic..."><i class="fas fa-file-alt"></i> Authentication Guide</a>
|
|
90
|
+
<a href="/guides/documentation-standards.html" class="nav-item" data-tooltip="This document defines the documentation standards and conventions for the @knowcode/doc-builder project."><i class="fas fa-file-alt"></i> Documentation Standards</a>
|
|
91
|
+
<a href="/guides/troubleshooting-guide.html" class="nav-item" data-tooltip="This guide helps you resolve common issues when using @knowcode/doc-builder."><i class="fas fa-file-alt"></i> Troubleshooting Guide</a></div></div>
|
|
90
92
|
</nav>
|
|
91
93
|
<div class="resize-handle"></div>
|
|
92
94
|
</aside>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
<div class="header-actions">
|
|
31
31
|
<div class="deployment-info">
|
|
32
|
-
<span class="deployment-date" title="Built with doc-builder v1.4.
|
|
32
|
+
<span class="deployment-date" title="Built with doc-builder v1.4.23">Last updated: Jul 21, 2025, 07:42 PM UTC</span>
|
|
33
33
|
</div>
|
|
34
34
|
|
|
35
35
|
|
|
@@ -86,7 +86,9 @@
|
|
|
86
86
|
<i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Guides
|
|
87
87
|
</a>
|
|
88
88
|
<div class="nav-content collapsed" id="nav-guides-1">
|
|
89
|
-
<a href="/guides/
|
|
89
|
+
<a href="/guides/authentication-guide.html" class="nav-item" data-tooltip="This guide explains how to configure and use the built-in authentication feature in @knowcode/doc-builder to protect your documentation with basic..."><i class="fas fa-file-alt"></i> Authentication Guide</a>
|
|
90
|
+
<a href="/guides/documentation-standards.html" class="nav-item" data-tooltip="This document defines the documentation standards and conventions for the @knowcode/doc-builder project."><i class="fas fa-file-alt"></i> Documentation Standards</a>
|
|
91
|
+
<a href="/guides/troubleshooting-guide.html" class="nav-item" data-tooltip="This guide helps you resolve common issues when using @knowcode/doc-builder."><i class="fas fa-file-alt"></i> Troubleshooting Guide</a></div></div>
|
|
90
92
|
</nav>
|
|
91
93
|
<div class="resize-handle"></div>
|
|
92
94
|
</aside>
|
|
@@ -974,7 +974,7 @@ tr:hover {
|
|
|
974
974
|
|
|
975
975
|
.content {
|
|
976
976
|
margin-left: 0;
|
|
977
|
-
padding: var(--space-
|
|
977
|
+
padding: var(--space-3) var(--space-4); /* Reduced top/bottom padding on mobile */
|
|
978
978
|
}
|
|
979
979
|
|
|
980
980
|
.menu-toggle {
|
|
@@ -1596,7 +1596,7 @@ tr:hover {
|
|
|
1596
1596
|
/* Sidebar positioning handled in earlier media query */
|
|
1597
1597
|
|
|
1598
1598
|
.content {
|
|
1599
|
-
padding: var(--space-4);
|
|
1599
|
+
padding: var(--space-3) var(--space-4); /* Consistent reduced padding on mobile */
|
|
1600
1600
|
}
|
|
1601
1601
|
|
|
1602
1602
|
.content-inner {
|
|
@@ -1609,10 +1609,7 @@ tr:hover {
|
|
|
1609
1609
|
padding: 0 var(--space-4);
|
|
1610
1610
|
}
|
|
1611
1611
|
|
|
1612
|
-
|
|
1613
|
-
position: relative;
|
|
1614
|
-
top: 0;
|
|
1615
|
-
}
|
|
1612
|
+
/* Keep preview banner fixed on mobile */
|
|
1616
1613
|
|
|
1617
1614
|
/* Keep breadcrumbs fixed on mobile to prevent double spacing */
|
|
1618
1615
|
}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
<div class="header-actions">
|
|
31
31
|
<div class="deployment-info">
|
|
32
|
-
<span class="deployment-date" title="Built with doc-builder v1.4.
|
|
32
|
+
<span class="deployment-date" title="Built with doc-builder v1.4.23">Last updated: Jul 21, 2025, 07:42 PM UTC</span>
|
|
33
33
|
</div>
|
|
34
34
|
|
|
35
35
|
|
|
@@ -86,7 +86,9 @@
|
|
|
86
86
|
<i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Guides
|
|
87
87
|
</a>
|
|
88
88
|
<div class="nav-content collapsed" id="nav-guides-1">
|
|
89
|
-
<a href="/guides/
|
|
89
|
+
<a href="/guides/authentication-guide.html" class="nav-item" data-tooltip="This guide explains how to configure and use the built-in authentication feature in @knowcode/doc-builder to protect your documentation with basic..."><i class="fas fa-file-alt"></i> Authentication Guide</a>
|
|
90
|
+
<a href="/guides/documentation-standards.html" class="nav-item" data-tooltip="This document defines the documentation standards and conventions for the @knowcode/doc-builder project."><i class="fas fa-file-alt"></i> Documentation Standards</a>
|
|
91
|
+
<a href="/guides/troubleshooting-guide.html" class="nav-item" data-tooltip="This guide helps you resolve common issues when using @knowcode/doc-builder."><i class="fas fa-file-alt"></i> Troubleshooting Guide</a></div></div>
|
|
90
92
|
</nav>
|
|
91
93
|
<div class="resize-handle"></div>
|
|
92
94
|
</aside>
|
|
@@ -104,7 +106,9 @@
|
|
|
104
106
|
├── documentation-index.md # This file - documentation map
|
|
105
107
|
├── claude-workflow-guide.md # AI workflow guide
|
|
106
108
|
└── guides/ # How-to guides and standards
|
|
107
|
-
|
|
109
|
+
├── authentication-guide.md # Authentication setup and usage
|
|
110
|
+
├── documentation-standards.md # Documentation standards
|
|
111
|
+
└── troubleshooting-guide.md # Common issues and solutions
|
|
108
112
|
</code></pre>
|
|
109
113
|
<h2>Documentation Categories</h2>
|
|
110
114
|
<h3>📚 Core Documentation</h3>
|
|
@@ -143,10 +147,20 @@
|
|
|
143
147
|
</thead>
|
|
144
148
|
<tbody><tr>
|
|
145
149
|
<td>Document Standards</td>
|
|
146
|
-
<td><a href="./guides/
|
|
150
|
+
<td><a href="./guides/documentation-standards.md">guides/documentation-standards.md</a></td>
|
|
147
151
|
<td>How to write docs for this project</td>
|
|
148
152
|
</tr>
|
|
149
153
|
<tr>
|
|
154
|
+
<td>Authentication Guide</td>
|
|
155
|
+
<td><a href="./guides/authentication-guide.md">guides/authentication-guide.md</a></td>
|
|
156
|
+
<td>Setting up password protection</td>
|
|
157
|
+
</tr>
|
|
158
|
+
<tr>
|
|
159
|
+
<td>Troubleshooting Guide</td>
|
|
160
|
+
<td><a href="./guides/troubleshooting-guide.md">guides/troubleshooting-guide.md</a></td>
|
|
161
|
+
<td>Common issues and solutions</td>
|
|
162
|
+
</tr>
|
|
163
|
+
<tr>
|
|
150
164
|
<td>Claude Workflow</td>
|
|
151
165
|
<td><a href="./claude-workflow-guide.md">claude-workflow-guide.md</a></td>
|
|
152
166
|
<td>Using Claude with doc-builder</td>
|
|
@@ -156,9 +170,9 @@
|
|
|
156
170
|
<ul>
|
|
157
171
|
<li><strong>API Reference</strong> - Detailed API documentation</li>
|
|
158
172
|
<li><strong>Architecture Guide</strong> - System design and components</li>
|
|
159
|
-
<li><strong>Troubleshooting</strong> - Common issues and solutions</li>
|
|
160
173
|
<li><strong>Plugin Development</strong> - Extending doc-builder</li>
|
|
161
174
|
<li><strong>Migration Guide</strong> - Upgrading from older versions</li>
|
|
175
|
+
<li><strong>Performance Guide</strong> - Optimizing large documentation sites</li>
|
|
162
176
|
</ul>
|
|
163
177
|
<h2>Quick Start Guides</h2>
|
|
164
178
|
<h3>For Users</h3>
|
|
@@ -228,6 +242,18 @@ Detailed information...
|
|
|
228
242
|
<td>System</td>
|
|
229
243
|
<td>Initial documentation index</td>
|
|
230
244
|
</tr>
|
|
245
|
+
<tr>
|
|
246
|
+
<td>2025-07-21</td>
|
|
247
|
+
<td>1.1</td>
|
|
248
|
+
<td>System</td>
|
|
249
|
+
<td>Added authentication guide</td>
|
|
250
|
+
</tr>
|
|
251
|
+
<tr>
|
|
252
|
+
<td>2025-07-21</td>
|
|
253
|
+
<td>1.2</td>
|
|
254
|
+
<td>System</td>
|
|
255
|
+
<td>Added troubleshooting guide</td>
|
|
256
|
+
</tr>
|
|
231
257
|
</tbody></table>
|
|
232
258
|
|
|
233
259
|
</div>
|