@knowcode/doc-builder 1.3.13 → 1.3.14
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 +8 -15
- 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%;
|
|
@@ -477,14 +470,14 @@ pre code {
|
|
|
477
470
|
/* Main Wrapper */
|
|
478
471
|
.main-wrapper {
|
|
479
472
|
display: flex;
|
|
480
|
-
height:
|
|
481
|
-
|
|
473
|
+
height: 100vh;
|
|
474
|
+
padding-top: calc(var(--header-height) + var(--breadcrumb-height));
|
|
482
475
|
overflow: hidden;
|
|
483
476
|
}
|
|
484
477
|
|
|
485
478
|
.main-wrapper.banner-visible {
|
|
486
|
-
height:
|
|
487
|
-
|
|
479
|
+
height: 100vh;
|
|
480
|
+
padding-top: calc(var(--header-height) + var(--breadcrumb-height) + 3.5rem);
|
|
488
481
|
}
|
|
489
482
|
|
|
490
483
|
/* Sidebar */
|
|
@@ -695,7 +688,7 @@ pre code {
|
|
|
695
688
|
.content {
|
|
696
689
|
flex: 1;
|
|
697
690
|
margin-left: var(--sidebar-width);
|
|
698
|
-
padding: var(--space-
|
|
691
|
+
padding: var(--space-2) var(--space-8) var(--space-4); /* Reduced top padding */
|
|
699
692
|
overflow-y: auto;
|
|
700
693
|
background: var(--color-bg-default);
|
|
701
694
|
transition: margin-left var(--duration-normal);
|
|
@@ -1037,7 +1030,7 @@ tr:hover {
|
|
|
1037
1030
|
|
|
1038
1031
|
.content {
|
|
1039
1032
|
margin-left: 0 !important;
|
|
1040
|
-
padding: var(--space-
|
|
1033
|
+
padding: var(--space-2) var(--space-4) var(--space-4); /* Reduced top padding */
|
|
1041
1034
|
max-width: 100%;
|
|
1042
1035
|
}
|
|
1043
1036
|
|
|
@@ -1679,7 +1672,7 @@ tr:hover {
|
|
|
1679
1672
|
|
|
1680
1673
|
.content {
|
|
1681
1674
|
margin-left: 0 !important;
|
|
1682
|
-
padding: var(--space-4);
|
|
1675
|
+
padding: var(--space-2) var(--space-4) var(--space-4); /* Reduced top padding */
|
|
1683
1676
|
max-width: 100%;
|
|
1684
1677
|
}
|
|
1685
1678
|
|
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)"
|