@knowcode/doc-builder 1.2.11 → 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 CHANGED
@@ -5,6 +5,20 @@ 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
+
8
22
  ## [1.2.11] - 2025-07-19
9
23
 
10
24
  ### Fixed
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowcode/doc-builder",
3
- "version": "1.2.11",
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": {