feat: download documentation dependencies locally for full self-hosting
Replaced CDN dependencies with local downloads for fully self-contained operation: - Highlight.js (syntax highlighting) - 121KB - Highlight.js GitHub Dark theme - 1.3KB - Lunr.js (documentation search) - 29KB - Lunr-flex (search plugin) - 43KB Changes: - Updated package.json postinstall to download all dependencies - Modified docs templates to use /web/static/ paths - Updated .gitignore to allow documentation dependencies - Total added: ~195KB (minimal container impact) Benefits: - ✅ Fully self-hosted - no external CDN requests - ✅ Works offline without internet access - ✅ No privacy/analytics leaks from CDNs - ✅ Consistent with project's self-hosting philosophy - ✅ Improved reliability for air-gapped deployments Note: Tailwind CSS CDN remains (development-only, production uses compiled CSS)
This commit is contained in:
@@ -12,10 +12,10 @@ templ DocsLayout(nav Navigation, doc Document, user User) {
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{ doc.Title } - Bookhoard Documentation</title>
|
||||
<script src="https://cdn.tailwindcss.com?plugins=typography"></script>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/lunr@2.3.9/lunr.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/lunr-flex@1.0.5/lunr.flex.min.js"></script>
|
||||
<link rel="stylesheet" href="/web/static/highlight-dark.min.css">
|
||||
<script src="/web/static/highlight.min.js"></script>
|
||||
<script src="/web/static/lunr.min.js"></script>
|
||||
<script src="/web/static/lunr-flex.min.js"></script>
|
||||
<script>
|
||||
tailwind.config = {
|
||||
darkMode: 'class',
|
||||
@@ -378,10 +378,10 @@ templ DocsLayoutWithExplorer(nav Navigation, doc Document, user User, explorer A
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{ doc.Title } - Bookhoard Documentation</title>
|
||||
<script src="https://cdn.tailwindcss.com?plugins=typography"></script>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/lunr@2.3.9/lunr.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/lunr-flex@1.0.5/lunr.flex.min.js"></script>
|
||||
<link rel="stylesheet" href="/web/static/highlight-dark.min.css">
|
||||
<script src="/web/static/highlight.min.js"></script>
|
||||
<script src="/web/static/lunr.min.js"></script>
|
||||
<script src="/web/static/lunr-flex.min.js"></script>
|
||||
<script>
|
||||
tailwind.config = {
|
||||
darkMode: 'class',
|
||||
|
||||
Reference in New Issue
Block a user