docs: FIX forgot to commit and push vendor dir for syntax highlight
This commit is contained in:
parent
52f870f33b
commit
d57a28b1ad
26 changed files with 1044 additions and 0 deletions
29
vendor/fetch.sh
vendored
Executable file
29
vendor/fetch.sh
vendored
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env bash
|
||||
# Re-download the vendored highlight.js ES modules.
|
||||
#
|
||||
# Run by hand when bumping HLJS_VERSION; the result is committed to git. This is
|
||||
# deliberately NOT part of the Docker build — baking the files into the image is
|
||||
# what keeps the app free of any network dependency at runtime.
|
||||
set -euo pipefail
|
||||
|
||||
HLJS_VERSION="${HLJS_VERSION:-11.9.0}"
|
||||
BASE="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/${HLJS_VERSION}/es"
|
||||
DEST="$(cd "$(dirname "$0")" && pwd)/hljs"
|
||||
|
||||
# Keep this list in sync with LANGS in app.py.
|
||||
LANGS=(accesslog apache bash cpp css diff dockerfile go graphql http ini
|
||||
java javascript json markdown nginx php powershell python rust sql
|
||||
typescript xml yaml)
|
||||
|
||||
mkdir -p "$DEST/languages"
|
||||
echo "highlight.js ${HLJS_VERSION} -> $DEST"
|
||||
|
||||
curl -fsS "$BASE/core.min.js" -o "$DEST/core.min.js"
|
||||
printf ' %-14s %6s bytes\n' core.min.js "$(wc -c < "$DEST/core.min.js")"
|
||||
|
||||
for lang in "${LANGS[@]}"; do
|
||||
curl -fsS "$BASE/languages/${lang}.min.js" -o "$DEST/languages/${lang}.min.js"
|
||||
printf ' %-14s %6s bytes\n' "$lang" "$(wc -c < "$DEST/languages/${lang}.min.js")"
|
||||
done
|
||||
|
||||
echo "total: $(du -sh "$DEST" | cut -f1) in $(find "$DEST" -type f | wc -l) files"
|
||||
Loading…
Add table
Add a link
Reference in a new issue