feat/fix: Site.conf now uses escaped " so it's more conventional
All checks were successful
Lint / shellcheck (push) Successful in 19s
Release Standalone Builder / build (release) Successful in 31s
Release Standalone Builder / publish-aur (release) Successful in 36s

This commit is contained in:
2026-03-18 08:49:41 +01:00
parent 95679abd85
commit 9ccba8fd4e
5 changed files with 16 additions and 8 deletions

2
.gitignore vendored
View File

@@ -1,2 +1,4 @@
out/ out/
kewt kewt
site.conf
template.html

View File

@@ -62,7 +62,7 @@ home_name = "Home"
show_home_in_nav = true show_home_in_nav = true
nav_links = "" nav_links = ""
nav_extra = "" nav_extra = ""
footer = "made with <a href="https://kewt.krzak.org">kewt</a>" footer = "made with <a href=\"https://kewt.krzak.org\">kewt</a>"
logo = "" logo = ""
display_logo = false display_logo = false
display_title = true display_title = true

14
kewt.sh
View File

@@ -44,7 +44,7 @@ home_name = "Home"
show_home_in_nav = true show_home_in_nav = true
nav_links = "" nav_links = ""
nav_extra = "" nav_extra = ""
footer = "made with <a href="https://kewt.krzak.org">kewt</a>" footer = "made with <a href=\"https://kewt.krzak.org\">kewt</a>"
logo = "" logo = ""
display_logo = false display_logo = false
display_title = true display_title = true
@@ -156,7 +156,7 @@ home_name = "Home"
show_home_in_nav = true show_home_in_nav = true
nav_links = "" nav_links = ""
nav_extra = "" nav_extra = ""
footer = "made with <a href="https://kewt.krzak.org">kewt</a>" footer = "made with <a href=\"https://kewt.krzak.org\">kewt</a>"
logo = "" logo = ""
display_logo = false display_logo = false
display_title = true display_title = true
@@ -456,8 +456,14 @@ load_config() {
key=$(printf '%s' "$key" | sed 's/^[[:space:]]*//; s/[[:space:]]*$//') key=$(printf '%s' "$key" | sed 's/^[[:space:]]*//; s/[[:space:]]*$//')
val=$(printf '%s' "$val" | sed 's/^[[:space:]]*//; s/[[:space:]]*$//') val=$(printf '%s' "$val" | sed 's/^[[:space:]]*//; s/[[:space:]]*$//')
case "$val" in case "$val" in
\"*\") val=${val#\"}; val=${val%\"} ;; \"*\")
\'*\') val=${val#\'}; val=${val%\'} ;; val=${val#\"}; val=${val%\"}
val=$(printf '%s' "$val" | sed 's/\\"/\"/g; s/\\\\/\\/g')
;;
\'*\')
val=${val#\'}; val=${val%\'}
val=$(printf '%s' "$val" | sed "s/\\\\'/'/g; s/\\\\/\\/g")
;;
esac esac
case "$key" in case "$key" in

View File

@@ -62,7 +62,7 @@ home_name = "Home"
show_home_in_nav = true show_home_in_nav = true
nav_links = "" nav_links = ""
nav_extra = "" nav_extra = ""
footer = "made with <a href="https://kewt.krzak.org">kewt</a>" footer = "made with <a href=\"https://kewt.krzak.org\">kewt</a>"
logo = "" logo = ""
display_logo = false display_logo = false
display_title = true display_title = true

View File

@@ -3,7 +3,7 @@ style = "kewt"
dir_indexes = true dir_indexes = true
single_file_index = true single_file_index = true
flatten = false flatten = false
footer = "<a href="https://kewt.krzak.org"><img src="/button.gif" /></a>" footer = "<a href=\"https://kewt.krzak.org\"><img src=\"/button.gif\" /></a>"
logo = "" logo = ""
display_logo = false display_logo = false
display_title = true display_title = true