diff options
fix: make theming work hopefully
-rwxr-xr-x | image/prepare-container.sh | 2 | ||||
-rw-r--r-- | image/syntax-highlighting.sh | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/image/prepare-container.sh b/image/prepare-container.sh index 66ccb2f..fabe6e2 100755 --- a/image/prepare-container.sh +++ b/image/prepare-container.sh @@ -14,6 +14,8 @@ ensureKeyAlgo ecdsa [[ -f /etc/sshd_config ]] && mv /etc/sshd_config /etc/ssh/sshd_config || [[ -f /etc/ssh/sshd_config ]] chmod -w /etc/ssh/sshd_config +echo "$HIGHLIGHT_THEME" > /.highlight-theme + # prepare run dir if ! [[ -d "/var/run/sshd" ]]; then mkdir -p /var/run/sshd diff --git a/image/syntax-highlighting.sh b/image/syntax-highlighting.sh index 0585f61..d119e22 100644 --- a/image/syntax-highlighting.sh +++ b/image/syntax-highlighting.sh @@ -118,6 +118,7 @@ EXTENSION="${BASENAME##*.}" #exec highlight --force -f -I -X -S "$EXTENSION" 2>/dev/null # This is for version 3 +HIGHLIGHT_THEME="${HIGHLIGHT_THEME:-"$(cat /.highlight-theme)"}" THEMEOPT=() if [[ "$HIGHLIGHT_THEME" != "" ]]; then THEMEOPT+=("--style=$HIGHLIGHT_THEME"); fi exec highlight --force --inline-css "${THEMEOPT[@]}" -f -I -O xhtml -S "$EXTENSION" 2>/dev/null |