@knowcode/doc-builder 1.2.4 → 1.2.5

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,17 @@ 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.5] - 2025-07-19
9
+
10
+ ### Fixed
11
+ - **Breadcrumbs** - Fixed URL-encoded characters showing in breadcrumb navigation (spaces showing as %20)
12
+ - **Root redirect** - Fixed index.html redirect to use JavaScript window.location.replace for better Vercel compatibility
13
+ - Breadcrumbs now properly decode URL segments before displaying
14
+
15
+ ### Improved
16
+ - Root page redirect is now more reliable with JavaScript-based redirection
17
+ - Better fallback link in case JavaScript is disabled
18
+
8
19
  ## [1.2.4] - 2025-07-19
9
20
 
10
21
  ### Fixed
package/assets/js/main.js CHANGED
@@ -1208,7 +1208,8 @@ function generateBreadcrumbs() {
1208
1208
  const breadcrumbContainer = document.getElementById('breadcrumbs');
1209
1209
  if (!breadcrumbContainer) return;
1210
1210
 
1211
- const currentPath = window.location.pathname;
1211
+ // Decode the URL to handle special characters and spaces
1212
+ const currentPath = decodeURIComponent(window.location.pathname);
1212
1213
  let pathSegments = currentPath.split('/').filter(segment => segment !== '');
1213
1214
 
1214
1215
  // Find the index of 'html' directory and slice from there
package/lib/deploy.js CHANGED
@@ -352,13 +352,17 @@ async function prepareDeployment(config) {
352
352
  <head>
353
353
  <meta charset="UTF-8">
354
354
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
355
- <meta http-equiv="refresh" content="0; url=README.html">
356
- <title>Redirecting...</title>
355
+ <title>${config.siteName || 'Documentation'}</title>
357
356
  <link rel="stylesheet" href="/css/style.css">
357
+ <script>
358
+ // Immediate redirect with fallback
359
+ window.location.replace('/README.html');
360
+ </script>
358
361
  </head>
359
362
  <body>
360
- <div style="text-align: center; margin-top: 50px;">
361
- <p>Redirecting to <a href="README.html">documentation</a>...</p>
363
+ <div style="text-align: center; margin-top: 50px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">
364
+ <p>Loading documentation...</p>
365
+ <p>If you are not redirected automatically, <a href="/README.html">click here</a>.</p>
362
366
  </div>
363
367
  </body>
364
368
  </html>`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowcode/doc-builder",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "Reusable documentation builder for markdown-based sites with Vercel deployment support",
5
5
  "main": "index.js",
6
6
  "bin": {