Vendor the JavaScript library dependencies

Use NPM to manage their versions: manually vendoring the libraries isn't feasible for Octokit, as its libraries aren't provided as single-file imports, and have nested dependencies of their own. Since NPM is needed to resolve that, use it for the other dependencies too.

Hugo's built-in bundling and minification support is used, though it means that the dependencies are duplicated within the scripts imported on different pages. I think that could be avoided by introducing a middle layer of JS assets that bundle the dependencies but aren't bundled themselves.
This commit is contained in:
Oliver Hamlet
2026-01-11 17:52:18 +00:00
parent c1194ac2ec
commit 608864cc7d
13 changed files with 497 additions and 21 deletions
+3
View File
@@ -47,6 +47,9 @@ jobs:
id: pages
uses: actions/configure-pages@v5
- name: Install Node.js dependencies
run: npm ci
- name: Build with Hugo
env:
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache