@knowcode/doc-builder 1.4.14 → 1.4.16

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.
@@ -15,7 +15,10 @@
15
15
  "Bash(git rebase:*)",
16
16
  "Bash(npm info:*)",
17
17
  "Bash(npx:*)",
18
- "Bash(grep:*)"
18
+ "Bash(grep:*)",
19
+ "Bash(npm cache clean:*)",
20
+ "Bash(ls:*)",
21
+ "Bash(npm run build:*)"
19
22
  ],
20
23
  "deny": []
21
24
  }
package/CHANGELOG.md CHANGED
@@ -5,6 +5,30 @@ 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.16] - 2025-07-21
9
+
10
+ ### Improved
11
+ - Enhanced menu tooltips to show clean text previews instead of raw markdown
12
+ - Tooltips now display properly formatted text with markdown syntax removed
13
+ - Better preview experience for document summaries
14
+
15
+ ### Background
16
+ - Previously tooltips showed raw markdown including asterisks, links, etc.
17
+ - Now provides clean, readable text excerpts from document content
18
+ - Improves user experience when hovering over menu items
19
+
20
+ ## [1.4.15] - 2025-07-21
21
+
22
+ ### Fixed
23
+ - Fixed index.html not being regenerated with current doc-builder version
24
+ - index.html is now always regenerated from README.html to ensure version consistency
25
+ - This prevents stale version numbers from being shown in deployed documentation
26
+
27
+ ### Background
28
+ - Previously, index.html was preserved if it existed and looked valid
29
+ - This caused version numbers to be stuck at older versions
30
+ - Now ensures index.html always reflects the current build version
31
+
8
32
  ## [1.4.14] - 2025-07-21
9
33
 
10
34
  ### Fixed
package/README.md CHANGED
@@ -4,6 +4,18 @@ Beautiful documentation with the least effort possible. A zero-configuration doc
4
4
 
5
5
  🔗 **[View Live Example](https://doc-builder-delta.vercel.app)** - See what your documentation will look like!
6
6
 
7
+ ## Recent Documentation Updates (Last 14 Days)
8
+
9
+ ### 🚀 System & Deployment (docs:)
10
+ - 🔄 **UPDATE**: [Claude + CLAUDE.md Documentation Workflow Guide](docs/claude-workflow-guide.md) - Documentation updates and improvements
11
+ - 🔄 **MAJOR UPDATE**: [Documentation Index](docs/documentation-index.md) - Significant updates with enhanced functionality and coverage
12
+ - 🔄 **MAJOR UPDATE**: [Document Standards for @knowcode/doc-builder](docs/guides/DOCUMENT-STANDARDS.md) - Significant updates with enhanced functionality and coverage
13
+ - 🔄 **UPDATE**: [@knowcode/doc-builder](docs/README.md) - Documentation updates and improvements
14
+ - 🔄 **UPDATE**: [Document Standards for @knowcode/doc-builder](docs/guides/document-standards.md) - Documentation updates and improvements
15
+
16
+ **Total Changes**: 0+ new documents, 5+ updates and improvements across 5 files
17
+
18
+
7
19
  ## Why This Project Exists
8
20
 
9
21
  The main premise of @knowcode/doc-builder is simple: **create beautiful documentation with the least effort possible**. We believe great documentation shouldn't require complex setup, configuration files, or deployment headaches. Just write markdown, run one command, and get a professional documentation site live on the web.
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.13">Last updated: Jul 21, 2025, 12:43 PM UTC</span>
32
+ <span class="deployment-date" title="Built with doc-builder v1.4.16">Last updated: Jul 21, 2025, 04:17 PM UTC</span>
33
33
  </div>
34
34
 
35
35
 
@@ -78,15 +78,15 @@
78
78
  <i class="fas fa-home"></i> Documentation
79
79
  </a>
80
80
  <div class="nav-content" >
81
- <a href="/README.html" class="nav-item active" data-tooltip="&gt; Transform your markdown documentation into beautiful, searchable websites with Notion-inspired styling Create stunning documentation sites in minute..."><i class="fas fa-file-alt"></i> Overview</a>
82
- <a href="/claude-workflow-guide.html" class="nav-item" data-tooltip="**Generated**: 2025-07-21 10:00 UTC **Status**: Complete **Verified**: ✅ This guide demonstrates an efficient workflow for using Claude Code with a re..."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
83
- <a href="/documentation-index.html" class="nav-item" data-tooltip="**Generated**: 2025-07-21 18:00 UTC **Status**: Complete **Verified**: ✅ This directory contains additional documentation for the @knowcode/doc-builde..."><i class="fas fa-file-alt"></i> Documentation Index</a></div></div>
81
+ <a href="/README.html" class="nav-item active" data-tooltip="@knowcode/doc-builder."><i class="fas fa-file-alt"></i> Overview</a>
82
+ <a href="/claude-workflow-guide.html" class="nav-item" data-tooltip="Claude + CLAUDE.md Documentation Workflow Guide."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
83
+ <a href="/documentation-index.html" class="nav-item" data-tooltip="Generated: 2025-07-21 18:00 UTC Status: Complete Verified: ✅ Overview."><i class="fas fa-file-alt"></i> Documentation Index</a></div></div>
84
84
  <div class="nav-section" data-level="1">
85
85
  <a class="nav-title collapsible expanded" href="#" data-target="nav-guides-1" >
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/document-standards.html" class="nav-item" data-tooltip="**Generated**: 2025-07-21 18:00 UTC **Status**: Complete **Verified**: ✅ This document defines the documentation standards and conventions for the @kn..."><i class="fas fa-file-alt"></i> Document Standards</a></div></div>
89
+ <a href="/guides/document-standards.html" class="nav-item" data-tooltip="Document Standards for @knowcode/doc-builder."><i class="fas fa-file-alt"></i> Document Standards</a></div></div>
90
90
  </nav>
91
91
  <div class="resize-handle"></div>
92
92
  </aside>
@@ -105,7 +105,7 @@
105
105
  npm install -g @knowcode/doc-builder
106
106
 
107
107
  # Or use with npx
108
- npx @knowcode/doc-builder@latest init
108
+ npx @knowcode/doc-builder@latest deploy
109
109
  </code></pre>
110
110
  <h2>✨ Features</h2>
111
111
  <h3>🎨 Beautiful Design</h3>
@@ -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.13">Last updated: Jul 21, 2025, 12:43 PM UTC</span>
32
+ <span class="deployment-date" title="Built with doc-builder v1.4.16">Last updated: Jul 21, 2025, 04:17 PM UTC</span>
33
33
  </div>
34
34
 
35
35
 
@@ -78,15 +78,15 @@
78
78
  <i class="fas fa-home"></i> Documentation
79
79
  </a>
80
80
  <div class="nav-content" >
81
- <a href="/README.html" class="nav-item" data-tooltip="&gt; Transform your markdown documentation into beautiful, searchable websites with Notion-inspired styling Create stunning documentation sites in minute..."><i class="fas fa-file-alt"></i> Overview</a>
82
- <a href="/claude-workflow-guide.html" class="nav-item active" data-tooltip="**Generated**: 2025-07-21 10:00 UTC **Status**: Complete **Verified**: ✅ This guide demonstrates an efficient workflow for using Claude Code with a re..."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
83
- <a href="/documentation-index.html" class="nav-item" data-tooltip="**Generated**: 2025-07-21 18:00 UTC **Status**: Complete **Verified**: ✅ This directory contains additional documentation for the @knowcode/doc-builde..."><i class="fas fa-file-alt"></i> Documentation Index</a></div></div>
81
+ <a href="/README.html" class="nav-item" data-tooltip="@knowcode/doc-builder."><i class="fas fa-file-alt"></i> Overview</a>
82
+ <a href="/claude-workflow-guide.html" class="nav-item active" data-tooltip="Claude + CLAUDE.md Documentation Workflow Guide."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
83
+ <a href="/documentation-index.html" class="nav-item" data-tooltip="Generated: 2025-07-21 18:00 UTC Status: Complete Verified: ✅ Overview."><i class="fas fa-file-alt"></i> Documentation Index</a></div></div>
84
84
  <div class="nav-section" data-level="1">
85
85
  <a class="nav-title collapsible" href="#" data-target="nav-guides-1" >
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/document-standards.html" class="nav-item" data-tooltip="**Generated**: 2025-07-21 18:00 UTC **Status**: Complete **Verified**: ✅ This document defines the documentation standards and conventions for the @kn..."><i class="fas fa-file-alt"></i> Document Standards</a></div></div>
89
+ <a href="/guides/document-standards.html" class="nav-item" data-tooltip="Document Standards for @knowcode/doc-builder."><i class="fas fa-file-alt"></i> Document Standards</a></div></div>
90
90
  </nav>
91
91
  <div class="resize-handle"></div>
92
92
  </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.13">Last updated: Jul 21, 2025, 12:43 PM UTC</span>
32
+ <span class="deployment-date" title="Built with doc-builder v1.4.16">Last updated: Jul 21, 2025, 04:17 PM UTC</span>
33
33
  </div>
34
34
 
35
35
 
@@ -78,15 +78,15 @@
78
78
  <i class="fas fa-home"></i> Documentation
79
79
  </a>
80
80
  <div class="nav-content" >
81
- <a href="/README.html" class="nav-item" data-tooltip="&gt; Transform your markdown documentation into beautiful, searchable websites with Notion-inspired styling Create stunning documentation sites in minute..."><i class="fas fa-file-alt"></i> Overview</a>
82
- <a href="/claude-workflow-guide.html" class="nav-item" data-tooltip="**Generated**: 2025-07-21 10:00 UTC **Status**: Complete **Verified**: ✅ This guide demonstrates an efficient workflow for using Claude Code with a re..."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
83
- <a href="/documentation-index.html" class="nav-item active" data-tooltip="**Generated**: 2025-07-21 18:00 UTC **Status**: Complete **Verified**: ✅ This directory contains additional documentation for the @knowcode/doc-builde..."><i class="fas fa-file-alt"></i> Documentation Index</a></div></div>
81
+ <a href="/README.html" class="nav-item" data-tooltip="@knowcode/doc-builder."><i class="fas fa-file-alt"></i> Overview</a>
82
+ <a href="/claude-workflow-guide.html" class="nav-item" data-tooltip="Claude + CLAUDE.md Documentation Workflow Guide."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
83
+ <a href="/documentation-index.html" class="nav-item active" data-tooltip="Generated: 2025-07-21 18:00 UTC Status: Complete Verified: ✅ Overview."><i class="fas fa-file-alt"></i> Documentation Index</a></div></div>
84
84
  <div class="nav-section" data-level="1">
85
85
  <a class="nav-title collapsible" href="#" data-target="nav-guides-1" >
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/document-standards.html" class="nav-item" data-tooltip="**Generated**: 2025-07-21 18:00 UTC **Status**: Complete **Verified**: ✅ This document defines the documentation standards and conventions for the @kn..."><i class="fas fa-file-alt"></i> Document Standards</a></div></div>
89
+ <a href="/guides/document-standards.html" class="nav-item" data-tooltip="Document Standards for @knowcode/doc-builder."><i class="fas fa-file-alt"></i> Document Standards</a></div></div>
90
90
  </nav>
91
91
  <div class="resize-handle"></div>
92
92
  </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.13">Last updated: Jul 21, 2025, 12:43 PM UTC</span>
32
+ <span class="deployment-date" title="Built with doc-builder v1.4.16">Last updated: Jul 21, 2025, 04:17 PM UTC</span>
33
33
  </div>
34
34
 
35
35
 
@@ -78,15 +78,15 @@
78
78
  <i class="fas fa-home"></i> Documentation
79
79
  </a>
80
80
  <div class="nav-content" >
81
- <a href="/README.html" class="nav-item" data-tooltip="&gt; Transform your markdown documentation into beautiful, searchable websites with Notion-inspired styling Create stunning documentation sites in minute..."><i class="fas fa-file-alt"></i> Overview</a>
82
- <a href="/claude-workflow-guide.html" class="nav-item" data-tooltip="**Generated**: 2025-07-21 10:00 UTC **Status**: Complete **Verified**: ✅ This guide demonstrates an efficient workflow for using Claude Code with a re..."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
83
- <a href="/documentation-index.html" class="nav-item" data-tooltip="**Generated**: 2025-07-21 18:00 UTC **Status**: Complete **Verified**: ✅ This directory contains additional documentation for the @knowcode/doc-builde..."><i class="fas fa-file-alt"></i> Documentation Index</a></div></div>
81
+ <a href="/README.html" class="nav-item" data-tooltip="@knowcode/doc-builder."><i class="fas fa-file-alt"></i> Overview</a>
82
+ <a href="/claude-workflow-guide.html" class="nav-item" data-tooltip="Claude + CLAUDE.md Documentation Workflow Guide."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
83
+ <a href="/documentation-index.html" class="nav-item" data-tooltip="Generated: 2025-07-21 18:00 UTC Status: Complete Verified: ✅ Overview."><i class="fas fa-file-alt"></i> Documentation Index</a></div></div>
84
84
  <div class="nav-section" data-level="1">
85
85
  <a class="nav-title collapsible expanded" href="#" data-target="nav-guides-1" >
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/document-standards.html" class="nav-item active" data-tooltip="**Generated**: 2025-07-21 18:00 UTC **Status**: Complete **Verified**: ✅ This document defines the documentation standards and conventions for the @kn..."><i class="fas fa-file-alt"></i> Document Standards</a></div></div>
89
+ <a href="/guides/document-standards.html" class="nav-item active" data-tooltip="Document Standards for @knowcode/doc-builder."><i class="fas fa-file-alt"></i> Document Standards</a></div></div>
90
90
  </nav>
91
91
  <div class="resize-handle"></div>
92
92
  </aside>
package/html/index.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.11">Last updated: Jul 21, 2025, 12:17 PM UTC</span>
32
+ <span class="deployment-date" title="Built with doc-builder v1.4.16">Last updated: Jul 21, 2025, 04:17 PM UTC</span>
33
33
  </div>
34
34
 
35
35
 
@@ -78,8 +78,15 @@
78
78
  <i class="fas fa-home"></i> Documentation
79
79
  </a>
80
80
  <div class="nav-content" >
81
- <a href="/README.html" class="nav-item active" data-tooltip="&gt; Transform your markdown documentation into beautiful, searchable websites with Notion-inspired styling Create stunning documentation sites in minute..."><i class="fas fa-file-alt"></i> Overview</a>
82
- <a href="/claude-workflow-guide.html" class="nav-item" data-tooltip="**Generated**: 2025-07-21 10:00 UTC **Status**: Complete **Verified**: ✅ This guide demonstrates an efficient workflow for using Claude Code with a re..."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a></div></div>
81
+ <a href="/README.html" class="nav-item active" data-tooltip="@knowcode/doc-builder."><i class="fas fa-file-alt"></i> Overview</a>
82
+ <a href="/claude-workflow-guide.html" class="nav-item" data-tooltip="Claude + CLAUDE.md Documentation Workflow Guide."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
83
+ <a href="/documentation-index.html" class="nav-item" data-tooltip="Generated: 2025-07-21 18:00 UTC Status: Complete Verified: ✅ Overview."><i class="fas fa-file-alt"></i> Documentation Index</a></div></div>
84
+ <div class="nav-section" data-level="1">
85
+ <a class="nav-title collapsible expanded" href="#" data-target="nav-guides-1" >
86
+ <i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Guides
87
+ </a>
88
+ <div class="nav-content" id="nav-guides-1">
89
+ <a href="/guides/document-standards.html" class="nav-item" data-tooltip="Document Standards for @knowcode/doc-builder."><i class="fas fa-file-alt"></i> Document Standards</a></div></div>
83
90
  </nav>
84
91
  <div class="resize-handle"></div>
85
92
  </aside>
@@ -98,7 +105,7 @@
98
105
  npm install -g @knowcode/doc-builder
99
106
 
100
107
  # Or use with npx
101
- npx @knowcode/doc-builder@latest init
108
+ npx @knowcode/doc-builder@latest deploy
102
109
  </code></pre>
103
110
  <h2>✨ Features</h2>
104
111
  <h3>🎨 Beautiful Design</h3>
@@ -29,26 +29,60 @@ function extractSummary(content, maxLength = 150) {
29
29
  // Remove front matter
30
30
  content = content.replace(/^---[\s\S]*?---\n/, '');
31
31
 
32
- // Remove headers
33
- content = content.replace(/^#+\s+.+$/gm, '');
32
+ // Remove headers but keep their text
33
+ content = content.replace(/^#+\s+(.+)$/gm, '$1. ');
34
34
 
35
35
  // Remove code blocks
36
36
  content = content.replace(/```[\s\S]*?```/g, '');
37
37
  content = content.replace(/`[^`]+`/g, '');
38
38
 
39
- // Remove images and links
39
+ // Remove images
40
40
  content = content.replace(/!\[[^\]]*\]\([^)]*\)/g, '');
41
- content = content.replace(/\[[^\]]*\]\([^)]*\)/g, '');
41
+
42
+ // Convert links to just their text
43
+ content = content.replace(/\[([^\]]*)\]\([^)]*\)/g, '$1');
42
44
 
43
45
  // Remove HTML tags
44
46
  content = content.replace(/<[^>]+>/g, '');
45
47
 
46
- // Remove extra whitespace
48
+ // Remove markdown formatting
49
+ content = content.replace(/\*\*([^*]+)\*\*/g, '$1'); // Bold
50
+ content = content.replace(/\*([^*]+)\*/g, '$1'); // Italic
51
+ content = content.replace(/__([^_]+)__/g, '$1'); // Bold
52
+ content = content.replace(/_([^_]+)_/g, '$1'); // Italic
53
+ content = content.replace(/~~([^~]+)~~/g, '$1'); // Strikethrough
54
+
55
+ // Remove blockquotes
56
+ content = content.replace(/^>\s*/gm, '');
57
+
58
+ // Remove list markers
59
+ content = content.replace(/^[-*+]\s+/gm, '');
60
+ content = content.replace(/^\d+\.\s+/gm, '');
61
+
62
+ // Remove horizontal rules
63
+ content = content.replace(/^---+$/gm, '');
64
+ content = content.replace(/^\*\*\*+$/gm, '');
65
+
66
+ // Remove extra whitespace and normalize
47
67
  content = content.trim().replace(/\s+/g, ' ');
48
68
 
69
+ // Skip common metadata patterns at the start
70
+ content = content.replace(/^(Generated|Status|Verified|Date|Author|Version|Updated|Created):\s*[^\n]+\s*/gi, '');
71
+
72
+ // Find the first meaningful content paragraph
73
+ const paragraphs = content.split(/\.\s+/).filter(p => p.trim().length > 20);
74
+ if (paragraphs.length > 0) {
75
+ content = paragraphs[0].trim();
76
+ if (!content.endsWith('.')) {
77
+ content += '.';
78
+ }
79
+ }
80
+
49
81
  // Truncate if needed
50
82
  if (content.length > maxLength) {
51
- content = content.substring(0, maxLength).trim() + '...';
83
+ // Try to cut at a word boundary
84
+ const cutIndex = content.lastIndexOf(' ', maxLength);
85
+ content = content.substring(0, cutIndex > 0 ? cutIndex : maxLength).trim() + '...';
52
86
  }
53
87
 
54
88
  return content || 'No description available';
@@ -586,6 +620,10 @@ async function buildDocumentation(config) {
586
620
  if (!fs.existsSync(indexPath)) {
587
621
  console.log(chalk.yellow('âš ī¸ index.html does not exist, need to create it'));
588
622
  shouldCreateIndex = true;
623
+ } else if (fs.existsSync(readmePath)) {
624
+ // If README.html exists, always regenerate index.html from it to ensure current version
625
+ console.log(chalk.blue('â„šī¸ Regenerating index.html from README.html to ensure current version'));
626
+ shouldCreateIndex = true;
589
627
  } else {
590
628
  // Check if existing index.html is likely a directory listing or outdated
591
629
  const indexStats = fs.statSync(indexPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowcode/doc-builder",
3
- "version": "1.4.14",
3
+ "version": "1.4.16",
4
4
  "description": "Reusable documentation builder for markdown-based sites with Vercel deployment support",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -21,12 +21,13 @@
21
21
  "author": "KnowCode",
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "marked": "^15.0.12",
25
- "commander": "^11.0.0",
24
+ "@knowcode/doc-builder": "^1.4.14",
26
25
  "chalk": "^4.1.2",
27
- "prompts": "^2.4.2",
26
+ "commander": "^11.0.0",
27
+ "fs-extra": "^11.2.0",
28
+ "marked": "^15.0.12",
28
29
  "ora": "5.4.1",
29
- "fs-extra": "^11.2.0"
30
+ "prompts": "^2.4.2"
30
31
  },
31
32
  "engines": {
32
33
  "node": ">=14.0.0"
File without changes