@knowcode/doc-builder 1.3.13 → 1.3.15
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/CACHE-BUSTING-GUIDE.md +82 -0
- package/CHANGELOG.md +14 -0
- package/assets/css/notion-style.css +12 -16
- package/package.json +1 -1
- package/test-cache-bust.sh +43 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Cache Busting Guide for @knowcode/doc-builder
|
|
2
|
+
|
|
3
|
+
If you're not seeing updates after upgrading to a new version, it's likely due to caching. Follow these steps:
|
|
4
|
+
|
|
5
|
+
## 1. Clean Everything Locally
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Remove old build artifacts
|
|
9
|
+
rm -rf html/
|
|
10
|
+
|
|
11
|
+
# Clear npm cache
|
|
12
|
+
npm cache clean --force
|
|
13
|
+
|
|
14
|
+
# Remove node_modules and reinstall
|
|
15
|
+
rm -rf node_modules
|
|
16
|
+
npm install
|
|
17
|
+
|
|
18
|
+
# Make sure you have the latest version
|
|
19
|
+
npm install @knowcode/doc-builder@latest
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 2. Rebuild with Fresh Files
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Build fresh documentation
|
|
26
|
+
npx @knowcode/doc-builder build
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 3. Deploy with Force Flag
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Force Vercel to ignore cache
|
|
33
|
+
vercel --prod --force
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 4. Clear Browser Cache
|
|
37
|
+
|
|
38
|
+
- **Chrome/Edge**: Cmd+Shift+R (Mac) or Ctrl+Shift+R (Windows)
|
|
39
|
+
- **Firefox**: Cmd+Shift+R (Mac) or Ctrl+Shift+R (Windows)
|
|
40
|
+
- **Safari**: Cmd+Option+R
|
|
41
|
+
- Or use Incognito/Private browsing mode
|
|
42
|
+
|
|
43
|
+
## 5. Clear Vercel/CDN Cache (if applicable)
|
|
44
|
+
|
|
45
|
+
If using Vercel:
|
|
46
|
+
1. Go to your project dashboard
|
|
47
|
+
2. Settings → Functions → Purge Cache
|
|
48
|
+
3. Or redeploy with a different domain temporarily
|
|
49
|
+
|
|
50
|
+
## 6. Add Cache Busting to Your Build
|
|
51
|
+
|
|
52
|
+
Edit your `doc-builder.config.js` to add version query strings:
|
|
53
|
+
|
|
54
|
+
```javascript
|
|
55
|
+
module.exports = {
|
|
56
|
+
// ... other config
|
|
57
|
+
cacheBust: true, // This will add ?v=timestamp to CSS/JS files
|
|
58
|
+
};
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Common Issues
|
|
62
|
+
|
|
63
|
+
- **"I updated but nothing changed"** - It's cache. Follow all steps above.
|
|
64
|
+
- **"Tooltips still don't work"** - Clear browser cache and check console for errors
|
|
65
|
+
- **"Spacing is still wrong"** - The CSS is cached. Hard refresh the page.
|
|
66
|
+
|
|
67
|
+
## Verify You Have The Right Version
|
|
68
|
+
|
|
69
|
+
Check the version in your package.json:
|
|
70
|
+
```bash
|
|
71
|
+
npm list @knowcode/doc-builder
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Should show: `@knowcode/doc-builder@1.3.13` or higher.
|
|
75
|
+
|
|
76
|
+
## Still Not Working?
|
|
77
|
+
|
|
78
|
+
1. Open browser DevTools
|
|
79
|
+
2. Go to Network tab
|
|
80
|
+
3. Check "Disable cache" checkbox
|
|
81
|
+
4. Refresh the page
|
|
82
|
+
5. Look at the CSS/JS files being loaded - they should not show "(from cache)"
|
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.3.14] - 2025-07-20
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Fixed excessive gap between breadcrumb and content area
|
|
12
|
+
- Changed `.main-wrapper` from using `margin-top` to `padding-top` to eliminate double spacing
|
|
13
|
+
- Reduced content top padding from `var(--space-4)` (16px) to `var(--space-2)` (8px)
|
|
14
|
+
- Removed duplicate `.sidebar-header` CSS definition
|
|
15
|
+
- Fixed mobile responsive padding to match desktop changes
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- Main wrapper now uses `height: 100vh` with `padding-top` instead of calculated height
|
|
19
|
+
- Content padding changed to `8px 32px 16px` for tighter vertical spacing
|
|
20
|
+
- Consistent padding reduction across all responsive breakpoints
|
|
21
|
+
|
|
8
22
|
## [1.3.13] - 2025-07-19
|
|
9
23
|
|
|
10
24
|
### Fixed
|
|
@@ -332,14 +332,7 @@ pre code {
|
|
|
332
332
|
top: calc(var(--header-height) + var(--breadcrumb-height) + 3.5rem);
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
-
|
|
336
|
-
padding: var(--space-4);
|
|
337
|
-
border-bottom: 1px solid var(--color-border-default);
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
.filter-box {
|
|
341
|
-
position: relative;
|
|
342
|
-
}
|
|
335
|
+
/* Sidebar header styles moved to main sidebar section */
|
|
343
336
|
|
|
344
337
|
.filter-input {
|
|
345
338
|
width: 100%;
|
|
@@ -476,15 +469,17 @@ pre code {
|
|
|
476
469
|
|
|
477
470
|
/* Main Wrapper */
|
|
478
471
|
.main-wrapper {
|
|
472
|
+
position: absolute;
|
|
473
|
+
top: calc(var(--header-height) + var(--breadcrumb-height));
|
|
474
|
+
left: 0;
|
|
475
|
+
right: 0;
|
|
476
|
+
bottom: 0;
|
|
479
477
|
display: flex;
|
|
480
|
-
height: calc(100vh - var(--header-height) - var(--breadcrumb-height));
|
|
481
|
-
margin-top: calc(var(--header-height) + var(--breadcrumb-height));
|
|
482
478
|
overflow: hidden;
|
|
483
479
|
}
|
|
484
480
|
|
|
485
481
|
.main-wrapper.banner-visible {
|
|
486
|
-
|
|
487
|
-
margin-top: calc(var(--header-height) + var(--breadcrumb-height) + 3.5rem);
|
|
482
|
+
top: calc(var(--header-height) + var(--breadcrumb-height) + 3.5rem);
|
|
488
483
|
}
|
|
489
484
|
|
|
490
485
|
/* Sidebar */
|
|
@@ -695,7 +690,7 @@ pre code {
|
|
|
695
690
|
.content {
|
|
696
691
|
flex: 1;
|
|
697
692
|
margin-left: var(--sidebar-width);
|
|
698
|
-
padding: var(--space-
|
|
693
|
+
padding: var(--space-2) var(--space-8) var(--space-4); /* Reduced top padding */
|
|
699
694
|
overflow-y: auto;
|
|
700
695
|
background: var(--color-bg-default);
|
|
701
696
|
transition: margin-left var(--duration-normal);
|
|
@@ -1037,7 +1032,7 @@ tr:hover {
|
|
|
1037
1032
|
|
|
1038
1033
|
.content {
|
|
1039
1034
|
margin-left: 0 !important;
|
|
1040
|
-
padding: var(--space-
|
|
1035
|
+
padding: var(--space-2) var(--space-4) var(--space-4); /* Reduced top padding */
|
|
1041
1036
|
max-width: 100%;
|
|
1042
1037
|
}
|
|
1043
1038
|
|
|
@@ -1665,8 +1660,9 @@ tr:hover {
|
|
|
1665
1660
|
}
|
|
1666
1661
|
|
|
1667
1662
|
.main-wrapper {
|
|
1663
|
+
position: relative; /* Change back to relative for mobile */
|
|
1664
|
+
top: 0;
|
|
1668
1665
|
flex-direction: column;
|
|
1669
|
-
height: auto;
|
|
1670
1666
|
min-height: calc(100vh - var(--header-height) - var(--breadcrumb-height));
|
|
1671
1667
|
}
|
|
1672
1668
|
|
|
@@ -1679,7 +1675,7 @@ tr:hover {
|
|
|
1679
1675
|
|
|
1680
1676
|
.content {
|
|
1681
1677
|
margin-left: 0 !important;
|
|
1682
|
-
padding: var(--space-4);
|
|
1678
|
+
padding: var(--space-2) var(--space-4) var(--space-4); /* Reduced top padding */
|
|
1683
1679
|
max-width: 100%;
|
|
1684
1680
|
}
|
|
1685
1681
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
echo "🧹 Cache Busting Test for doc-builder"
|
|
4
|
+
echo "===================================="
|
|
5
|
+
|
|
6
|
+
# Step 1: Clean everything
|
|
7
|
+
echo "1. Removing old build artifacts..."
|
|
8
|
+
rm -rf html/
|
|
9
|
+
rm -rf node_modules/
|
|
10
|
+
rm -rf .cache/
|
|
11
|
+
|
|
12
|
+
# Step 2: Clear npm cache
|
|
13
|
+
echo "2. Clearing npm cache..."
|
|
14
|
+
npm cache clean --force
|
|
15
|
+
|
|
16
|
+
# Step 3: Install latest version
|
|
17
|
+
echo "3. Installing latest doc-builder..."
|
|
18
|
+
npm install @knowcode/doc-builder@latest
|
|
19
|
+
|
|
20
|
+
# Step 4: Show version
|
|
21
|
+
echo "4. Installed version:"
|
|
22
|
+
npm list @knowcode/doc-builder
|
|
23
|
+
|
|
24
|
+
# Step 5: Build fresh
|
|
25
|
+
echo "5. Building documentation..."
|
|
26
|
+
npx @knowcode/doc-builder build
|
|
27
|
+
|
|
28
|
+
# Step 6: Check CSS content
|
|
29
|
+
echo "6. Checking if CSS has latest changes..."
|
|
30
|
+
echo " Looking for 'margin: 0; /* Left aligned'..."
|
|
31
|
+
grep -n "margin: 0; /\* Left aligned" html/css/notion-style.css || echo "NOT FOUND!"
|
|
32
|
+
|
|
33
|
+
echo " Looking for 'position: fixed; /* Use fixed'..."
|
|
34
|
+
grep -n "position: fixed; /\* Use fixed" html/css/notion-style.css || echo "NOT FOUND!"
|
|
35
|
+
|
|
36
|
+
echo ""
|
|
37
|
+
echo "✅ If you see the CSS changes above, the package is working correctly!"
|
|
38
|
+
echo "🚨 If not found, there's a build issue we need to investigate."
|
|
39
|
+
echo ""
|
|
40
|
+
echo "Next steps:"
|
|
41
|
+
echo "1. Deploy with: vercel --prod --force"
|
|
42
|
+
echo "2. Open in incognito/private browsing"
|
|
43
|
+
echo "3. Hard refresh: Cmd+Shift+R (Mac) or Ctrl+Shift+R (Windows)"
|