From 52ef0a87f842275d183ea8a391df63ff2dd81bd4 Mon Sep 17 00:00:00 2001 From: memdmp Date: Sun, 5 Jan 2025 13:51:01 +0100 Subject: fix: make theming work hopefully --- image/prepare-container.sh | 2 ++ image/syntax-highlighting.sh | 1 + 2 files changed, 3 insertions(+) (limited to 'image') 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 -- cgit v1.2.3