@knowcode/doc-builder 1.4.16 → 1.4.17
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 +13 -0
- package/html/README.html +4 -4
- package/html/claude-workflow-guide.html +4 -4
- package/html/documentation-index.html +4 -4
- package/html/guides/document-standards.html +4 -4
- package/html/index.html +4 -4
- package/lib/core-builder.js +45 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@ 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.17] - 2025-07-21
|
|
9
|
+
|
|
10
|
+
### Improved
|
|
11
|
+
- Enhanced tooltip extraction to show content from Overview/Summary sections
|
|
12
|
+
- Tooltips now display the actual overview text from documents
|
|
13
|
+
- Provides more meaningful previews when hovering over menu items
|
|
14
|
+
|
|
15
|
+
### Background
|
|
16
|
+
- Previously tooltips showed just the first few words from documents
|
|
17
|
+
- Now extracts content specifically from "Overview" or "Summary" sections
|
|
18
|
+
- Falls back to first paragraph if no Overview/Summary section exists
|
|
19
|
+
- Provides better context about what each document contains
|
|
20
|
+
|
|
8
21
|
## [1.4.16] - 2025-07-21
|
|
9
22
|
|
|
10
23
|
### Improved
|
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.17">Last updated: Jul 21, 2025, 04:26 PM UTC</span>
|
|
33
33
|
</div>
|
|
34
34
|
|
|
35
35
|
|
|
@@ -79,14 +79,14 @@
|
|
|
79
79
|
</a>
|
|
80
80
|
<div class="nav-content" >
|
|
81
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
|
|
83
|
-
<a href="/documentation-index.html" class="nav-item" data-tooltip="
|
|
82
|
+
<a href="/claude-workflow-guide.html" class="nav-item" data-tooltip="This guide demonstrates an efficient workflow for using Claude Code with a refined CLAUDE.md file to create high-quality documentation and deploy it..."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
|
|
83
|
+
<a href="/documentation-index.html" class="nav-item" data-tooltip="This directory contains additional documentation for the @knowcode/doc-builder project, organized by topic and purpose."><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/
|
|
89
|
+
<a href="/guides/DOCUMENT-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> 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.
|
|
32
|
+
<span class="deployment-date" title="Built with doc-builder v1.4.17">Last updated: Jul 21, 2025, 04:26 PM UTC</span>
|
|
33
33
|
</div>
|
|
34
34
|
|
|
35
35
|
|
|
@@ -79,14 +79,14 @@
|
|
|
79
79
|
</a>
|
|
80
80
|
<div class="nav-content" >
|
|
81
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
|
|
83
|
-
<a href="/documentation-index.html" class="nav-item" data-tooltip="
|
|
82
|
+
<a href="/claude-workflow-guide.html" class="nav-item active" data-tooltip="This guide demonstrates an efficient workflow for using Claude Code with a refined CLAUDE.md file to create high-quality documentation and deploy it..."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
|
|
83
|
+
<a href="/documentation-index.html" class="nav-item" data-tooltip="This directory contains additional documentation for the @knowcode/doc-builder project, organized by topic and purpose."><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/
|
|
89
|
+
<a href="/guides/DOCUMENT-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> 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.
|
|
32
|
+
<span class="deployment-date" title="Built with doc-builder v1.4.17">Last updated: Jul 21, 2025, 04:26 PM UTC</span>
|
|
33
33
|
</div>
|
|
34
34
|
|
|
35
35
|
|
|
@@ -79,14 +79,14 @@
|
|
|
79
79
|
</a>
|
|
80
80
|
<div class="nav-content" >
|
|
81
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
|
|
83
|
-
<a href="/documentation-index.html" class="nav-item active" data-tooltip="
|
|
82
|
+
<a href="/claude-workflow-guide.html" class="nav-item" data-tooltip="This guide demonstrates an efficient workflow for using Claude Code with a refined CLAUDE.md file to create high-quality documentation and deploy it..."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
|
|
83
|
+
<a href="/documentation-index.html" class="nav-item active" data-tooltip="This directory contains additional documentation for the @knowcode/doc-builder project, organized by topic and purpose."><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/
|
|
89
|
+
<a href="/guides/DOCUMENT-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> 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.
|
|
32
|
+
<span class="deployment-date" title="Built with doc-builder v1.4.17">Last updated: Jul 21, 2025, 04:26 PM UTC</span>
|
|
33
33
|
</div>
|
|
34
34
|
|
|
35
35
|
|
|
@@ -79,14 +79,14 @@
|
|
|
79
79
|
</a>
|
|
80
80
|
<div class="nav-content" >
|
|
81
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
|
|
83
|
-
<a href="/documentation-index.html" class="nav-item" data-tooltip="
|
|
82
|
+
<a href="/claude-workflow-guide.html" class="nav-item" data-tooltip="This guide demonstrates an efficient workflow for using Claude Code with a refined CLAUDE.md file to create high-quality documentation and deploy it..."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
|
|
83
|
+
<a href="/documentation-index.html" class="nav-item" data-tooltip="This directory contains additional documentation for the @knowcode/doc-builder project, organized by topic and purpose."><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/
|
|
89
|
+
<a href="/guides/DOCUMENT-STANDARDS.html" class="nav-item active" data-tooltip="This document defines the documentation standards and conventions for the @knowcode/doc-builder project."><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.
|
|
32
|
+
<span class="deployment-date" title="Built with doc-builder v1.4.17">Last updated: Jul 21, 2025, 04:26 PM UTC</span>
|
|
33
33
|
</div>
|
|
34
34
|
|
|
35
35
|
|
|
@@ -79,14 +79,14 @@
|
|
|
79
79
|
</a>
|
|
80
80
|
<div class="nav-content" >
|
|
81
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
|
|
83
|
-
<a href="/documentation-index.html" class="nav-item" data-tooltip="
|
|
82
|
+
<a href="/claude-workflow-guide.html" class="nav-item" data-tooltip="This guide demonstrates an efficient workflow for using Claude Code with a refined CLAUDE.md file to create high-quality documentation and deploy it..."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
|
|
83
|
+
<a href="/documentation-index.html" class="nav-item" data-tooltip="This directory contains additional documentation for the @knowcode/doc-builder project, organized by topic and purpose."><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/
|
|
89
|
+
<a href="/guides/DOCUMENT-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> DOCUMENT STANDARDS</a></div></div>
|
|
90
90
|
</nav>
|
|
91
91
|
<div class="resize-handle"></div>
|
|
92
92
|
</aside>
|
package/lib/core-builder.js
CHANGED
|
@@ -29,6 +29,51 @@ function extractSummary(content, maxLength = 150) {
|
|
|
29
29
|
// Remove front matter
|
|
30
30
|
content = content.replace(/^---[\s\S]*?---\n/, '');
|
|
31
31
|
|
|
32
|
+
// First, try to find Overview or Summary sections
|
|
33
|
+
const overviewMatch = content.match(/##\s+(Overview|Summary)\s*\n+([\s\S]*?)(?=\n##|\n#[^#]|$)/i);
|
|
34
|
+
if (overviewMatch) {
|
|
35
|
+
// Extract the content under Overview/Summary section
|
|
36
|
+
let summaryContent = overviewMatch[2];
|
|
37
|
+
|
|
38
|
+
// Clean up the extracted content
|
|
39
|
+
summaryContent = summaryContent.replace(/```[\s\S]*?```/g, ''); // Remove code blocks
|
|
40
|
+
summaryContent = summaryContent.replace(/`[^`]+`/g, ''); // Remove inline code
|
|
41
|
+
summaryContent = summaryContent.replace(/!\[[^\]]*\]\([^)]*\)/g, ''); // Remove images
|
|
42
|
+
summaryContent = summaryContent.replace(/\[([^\]]*)\]\([^)]*\)/g, '$1'); // Convert links to text
|
|
43
|
+
summaryContent = summaryContent.replace(/<[^>]+>/g, ''); // Remove HTML
|
|
44
|
+
summaryContent = summaryContent.replace(/\*\*([^*]+)\*\*/g, '$1'); // Remove bold
|
|
45
|
+
summaryContent = summaryContent.replace(/\*([^*]+)\*/g, '$1'); // Remove italic
|
|
46
|
+
summaryContent = summaryContent.replace(/__([^_]+)__/g, '$1'); // Remove bold alt
|
|
47
|
+
summaryContent = summaryContent.replace(/_([^_]+)_/g, '$1'); // Remove italic alt
|
|
48
|
+
summaryContent = summaryContent.replace(/~~([^~]+)~~/g, '$1'); // Remove strikethrough
|
|
49
|
+
summaryContent = summaryContent.replace(/^>\s*/gm, ''); // Remove blockquotes
|
|
50
|
+
summaryContent = summaryContent.replace(/^[-*+]\s+/gm, ''); // Remove list markers
|
|
51
|
+
summaryContent = summaryContent.replace(/^\d+\.\s+/gm, ''); // Remove numbered lists
|
|
52
|
+
summaryContent = summaryContent.replace(/^---+$/gm, ''); // Remove horizontal rules
|
|
53
|
+
summaryContent = summaryContent.replace(/^\*\*\*+$/gm, ''); // Remove horizontal rules alt
|
|
54
|
+
|
|
55
|
+
// Normalize whitespace
|
|
56
|
+
summaryContent = summaryContent.trim().replace(/\s+/g, ' ');
|
|
57
|
+
|
|
58
|
+
// Get the first sentence or paragraph
|
|
59
|
+
const sentences = summaryContent.split(/\.\s+/);
|
|
60
|
+
if (sentences.length > 0 && sentences[0].trim().length > 10) {
|
|
61
|
+
summaryContent = sentences[0].trim();
|
|
62
|
+
if (!summaryContent.endsWith('.')) {
|
|
63
|
+
summaryContent += '.';
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Truncate if needed
|
|
67
|
+
if (summaryContent.length > maxLength) {
|
|
68
|
+
const cutIndex = summaryContent.lastIndexOf(' ', maxLength);
|
|
69
|
+
summaryContent = summaryContent.substring(0, cutIndex > 0 ? cutIndex : maxLength).trim() + '...';
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return summaryContent;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Fallback to original logic if no Overview/Summary section found
|
|
32
77
|
// Remove headers but keep their text
|
|
33
78
|
content = content.replace(/^#+\s+(.+)$/gm, '$1. ');
|
|
34
79
|
|