@knowcode/doc-builder 1.2.10 → 1.2.12
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 +23 -0
- package/assets/css/style.css +1 -1
- package/lib/config.js +21 -0
- package/package.json +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,29 @@ 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.2.12] - 2025-07-19
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Support for alternative config file formats (site.title → siteName mapping)
|
|
12
|
+
- Support for input/output directory mapping in config files
|
|
13
|
+
- Debug logging for site name configuration
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
- Header now properly displays the project name from config instead of generic "Documentation"
|
|
17
|
+
- Config loader now handles both old and new config formats
|
|
18
|
+
|
|
19
|
+
### Documentation
|
|
20
|
+
- Updated GasWorld config to use correct format with siteName: 'GasWorld'
|
|
21
|
+
|
|
22
|
+
## [1.2.11] - 2025-07-19
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
- Reduced excessive top spacing in content area by adjusting padding from 1.5rem to 1rem
|
|
26
|
+
- Improved visual layout by reducing the gap between header and content
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
- Content area now uses asymmetric padding (1rem top, 2rem sides, 1.5rem bottom) for better visual balance
|
|
30
|
+
|
|
8
31
|
## [1.2.10] - 2025-07-19
|
|
9
32
|
|
|
10
33
|
### Fixed
|
package/assets/css/style.css
CHANGED
|
@@ -1087,7 +1087,7 @@ em, i {
|
|
|
1087
1087
|
.content {
|
|
1088
1088
|
flex: 1;
|
|
1089
1089
|
margin-left: var(--sidebar-width);
|
|
1090
|
-
padding: var(--space-
|
|
1090
|
+
padding: var(--space-lg) var(--space-2xl) var(--space-xl);
|
|
1091
1091
|
max-width: calc(var(--content-max-width) + var(--space-2xl) * 2);
|
|
1092
1092
|
transition: margin-left var(--transition-base);
|
|
1093
1093
|
}
|
package/lib/config.js
CHANGED
|
@@ -153,6 +153,27 @@ async function loadConfig(configPath, options = {}) {
|
|
|
153
153
|
try {
|
|
154
154
|
const customConfig = require(customConfigPath);
|
|
155
155
|
config = { ...config, ...customConfig };
|
|
156
|
+
|
|
157
|
+
// Handle alternative config formats
|
|
158
|
+
if (customConfig.site) {
|
|
159
|
+
// Map site.title to siteName
|
|
160
|
+
if (customConfig.site.title) {
|
|
161
|
+
config.siteName = customConfig.site.title;
|
|
162
|
+
console.log(chalk.gray(` Using site name: ${config.siteName}`));
|
|
163
|
+
}
|
|
164
|
+
if (customConfig.site.description) {
|
|
165
|
+
config.siteDescription = customConfig.site.description;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// Map input/output to docsDir/outputDir
|
|
170
|
+
if (customConfig.input) {
|
|
171
|
+
config.docsDir = customConfig.input;
|
|
172
|
+
}
|
|
173
|
+
if (customConfig.output) {
|
|
174
|
+
config.outputDir = customConfig.output;
|
|
175
|
+
}
|
|
176
|
+
|
|
156
177
|
console.log(chalk.gray(`Loaded config from ${configPath}`));
|
|
157
178
|
} catch (error) {
|
|
158
179
|
console.warn(chalk.yellow(`Warning: Failed to load config file: ${error.message}`));
|
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knowcode/doc-builder",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.12",
|
|
4
4
|
"description": "Reusable documentation builder for markdown-based sites with Vercel deployment support",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"doc-builder": "
|
|
8
|
-
"@knowcode/doc-builder": "./scripts/npx-runner.js"
|
|
7
|
+
"doc-builder": "scripts/npx-runner.js"
|
|
9
8
|
},
|
|
10
9
|
"scripts": {
|
|
11
10
|
"postinstall": "node scripts/setup.js || true",
|