- lib-icons/ -> libraries/icons/ (C library icon SVGs stay with their libs) - libraries/highlight/ -> vendor/highlight/ (not committed, downloaded) - lib/mathjax/ -> vendor/mathjax/ (not committed, downloaded) - vendor/download.sh fetches highlight.js v11.10.0 and MathJax v3.2.2 - index.html paths updated to vendor/ - .gitignore ignores vendor/* (except download.sh) - Removes ~1.2MB of binary font files from git tracking
27 lines
1.1 KiB
Bash
27 lines
1.1 KiB
Bash
#!/usr/bin/env bash
|
|
# ── Download vendor assets (highlight.js + MathJax) ──────────────────────
|
|
#
|
|
# These files are large and rarely change. They are NOT committed to git.
|
|
# Run this script after cloning or pulling to set up the vendor directory.
|
|
#
|
|
# Usage: bash vendor/download.sh
|
|
|
|
set -euo pipefail
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
|
|
echo "==> Downloading highlight.js (v11.10.0)..."
|
|
mkdir -p "$SCRIPT_DIR/highlight"
|
|
curl -sL "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/highlight.min.js" \
|
|
-o "$SCRIPT_DIR/highlight/highlight.min.js"
|
|
curl -sL "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/languages/c.min.js" \
|
|
-o "$SCRIPT_DIR/highlight/c.min.js"
|
|
curl -sL "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/default.min.css" \
|
|
-o "$SCRIPT_DIR/highlight/default.min.css"
|
|
|
|
echo "==> Downloading MathJax (v3.2.2, tex-mml-chtml)..."
|
|
mkdir -p "$SCRIPT_DIR/mathjax"
|
|
curl -sL "https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-mml-chtml.js" \
|
|
-o "$SCRIPT_DIR/mathjax/tex-mml-chtml.js"
|
|
|
|
echo "==> Done. Vendor assets downloaded to $SCRIPT_DIR"
|