@knowcode/doc-builder 1.1.8 → 1.1.10
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/CHANGELOG.md +22 -0
- package/assets/css/notion-style.css +31 -0
- package/cli.js +1 -0
- package/lib/core-builder.js +13 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,28 @@ 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.1.10] - 2025-07-19
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Fixed navigation for flat file structures (no folders)
|
|
12
|
+
- Added proper CSS styling for flat navigation layouts
|
|
13
|
+
- Navigation now works correctly when all files are in root directory
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- Flat navigation detection and handling
|
|
17
|
+
- Specific CSS classes for flat vs collapsible navigation
|
|
18
|
+
- Improved navigation styling for simple project structures
|
|
19
|
+
|
|
20
|
+
### Improved
|
|
21
|
+
- Better navigation experience for projects without folder hierarchies
|
|
22
|
+
- Consistent navigation styling across all project structures
|
|
23
|
+
|
|
24
|
+
## [1.1.9] - 2025-07-19
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
- Fixed "outputPath is not defined" error in deploy command
|
|
28
|
+
- Corrected variable scope issue introduced in 1.1.8
|
|
29
|
+
|
|
8
30
|
## [1.1.8] - 2025-07-19
|
|
9
31
|
|
|
10
32
|
### Changed
|
|
@@ -1459,4 +1459,35 @@ tr:hover {
|
|
|
1459
1459
|
[data-tooltip]::after {
|
|
1460
1460
|
display: none;
|
|
1461
1461
|
}
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
/* Navigation: Flat vs Collapsible */
|
|
1465
|
+
.nav-flat .nav-folder-toggle {
|
|
1466
|
+
display: none;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
.nav-flat li {
|
|
1470
|
+
margin-bottom: var(--space-0-5);
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
.nav-flat .nav-link {
|
|
1474
|
+
display: block;
|
|
1475
|
+
padding: var(--space-1) var(--space-2);
|
|
1476
|
+
color: var(--color-text-secondary);
|
|
1477
|
+
text-decoration: none;
|
|
1478
|
+
border-radius: var(--border-radius-md);
|
|
1479
|
+
transition: all 0.2s ease;
|
|
1480
|
+
font-size: var(--text-sm);
|
|
1481
|
+
font-weight: 400;
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
.nav-flat .nav-link:hover {
|
|
1485
|
+
background: var(--color-bg-hover);
|
|
1486
|
+
color: var(--color-text-primary);
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
.nav-flat .nav-link.active {
|
|
1490
|
+
background: var(--color-accent-blue-bg);
|
|
1491
|
+
color: var(--color-accent-blue);
|
|
1492
|
+
font-weight: 500;
|
|
1462
1493
|
}
|
package/cli.js
CHANGED
|
@@ -277,6 +277,7 @@ ${chalk.yellow('Troubleshooting:')}
|
|
|
277
277
|
await prepareDeployment(config);
|
|
278
278
|
|
|
279
279
|
// Check if this is the first deployment
|
|
280
|
+
const outputPath = path.join(process.cwd(), config.outputDir || 'html');
|
|
280
281
|
const vercelProjectPath = path.join(outputPath, '.vercel', 'project.json');
|
|
281
282
|
if (!fs.existsSync(vercelProjectPath)) {
|
|
282
283
|
spinner.stop();
|
package/lib/core-builder.js
CHANGED
|
@@ -208,7 +208,19 @@ function buildNavigationStructure(files, currentFile) {
|
|
|
208
208
|
return Object.values(node.folders).some(folder => checkActiveChild(folder, currentFile));
|
|
209
209
|
};
|
|
210
210
|
|
|
211
|
-
|
|
211
|
+
const navHTML = generateNavHTML(tree);
|
|
212
|
+
|
|
213
|
+
// If there are no folders (flat structure), wrap in a simple nav-list
|
|
214
|
+
// If there are folders, use collapsible navigation
|
|
215
|
+
const hasFolders = Object.keys(tree.folders).length > 0;
|
|
216
|
+
|
|
217
|
+
if (!hasFolders) {
|
|
218
|
+
// Simple flat navigation
|
|
219
|
+
return `<ul class="nav-list nav-flat">${navHTML}</ul>`;
|
|
220
|
+
} else {
|
|
221
|
+
// Collapsible navigation with folders
|
|
222
|
+
return `<ul class="nav-list nav-collapsible">${navHTML}</ul>`;
|
|
223
|
+
}
|
|
212
224
|
}
|
|
213
225
|
|
|
214
226
|
// Process single markdown file
|