Skip to content

Commit 0b32a88

Browse files
bejarcodeclaude
andcommitted
fix(website): use local library build and fix CSP issues
Critical fixes to resolve library loading failures: **Issue**: CornerKit library was not loading from CDN (404 errors) **Root Cause**: Library not yet published to npm, so jsdelivr/unpkg CDN URLs fail **Changes**: 1. Copy local build from packages/core/dist/cornerkit.js to website/ 2. Update index.html to load from local build instead of CDN 3. Fix CSP to allow placeholder images (via.placeholder.com) 4. Remove frame-ancestors from meta CSP (should be HTTP header only) **Result**: Library now loads successfully, smoothing parameter works correctly Tested with local server - all functionality working: - Hero animations - Playground sliders (radius & smoothing) - Gallery examples (26 components) - Comparison section - Keyboard shortcuts (R, I) - Code generation and clipboard copy 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ca73717 commit 0b32a88

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

website/cornerkit.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/index.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<meta property="og:image" content="https://bejarcode.github.io/cornerkit/assets/og-image.png">
1919

2020
<!-- Security -->
21-
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self'; base-uri 'self'; form-action 'self'; frame-ancestors 'none';">
21+
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https://via.placeholder.com; font-src 'self'; connect-src 'self'; base-uri 'self'; form-action 'self';">
2222

2323
<!-- Favicon -->
2424
<link rel="icon" type="image/svg+xml" href="assets/favicon.svg">
@@ -513,9 +513,8 @@ <h4>Vue (Coming Soon)</h4>
513513
</div>
514514
</footer>
515515

516-
<!-- CornerKit from CDN with fallback -->
517-
<script src="https://cdn.jsdelivr.net/npm/@cornerkit/core@1.0.0/dist/cornerkit.js"
518-
onerror="this.onerror=null; this.src='https://unpkg.com/@cornerkit/core@1.0.0/dist/cornerkit.js'"></script>
516+
<!-- CornerKit library (local build until published to npm) -->
517+
<script src="cornerkit.js"></script>
519518
<script src="app.js"></script>
520519
</body>
521520
</html>

0 commit comments

Comments
 (0)