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:
2026-02-02 21:22:55 -05:00
parent ed0a41e2d1
commit 0fe4a1dacc
7 changed files with 1241 additions and 11 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
"build:css:prod": "tailwindcss -i ./web/static/input.css -o ./web/static/style.css --minify",
"build:ts": "tsc",
"build:ts:watch": "tsc --watch",
"postinstall": "mkdir -p web/static && curl -L https://unpkg.com/htmx.org@1.9.10/dist/htmx.min.js -o web/static/htmx.min.js"
"postinstall": "mkdir -p web/static && curl -L https://unpkg.com/htmx.org@1.9.10/dist/htmx.min.js -o web/static/htmx.min.js && curl -L https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js -o web/static/highlight.min.js && curl -L https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css -o web/static/highlight-dark.min.css && curl -L https://cdn.jsdelivr.net/npm/lunr@2.3.9/lunr.min.js -o web/static/lunr.min.js && curl -L https://cdn.jsdelivr.net/npm/lunr-flex@1.0.5/lunr.flex.min.js -o web/static/lunr-flex.min.js"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.7",