summaryrefslogtreecommitdiff
path: root/src/html
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-05-01 18:34:41 -0300
committerEuAndreh <eu@euandre.org>2025-05-01 19:17:48 -0300
commit1fce51b295283d3ac2ae8a36d81e44845fb27415 (patch)
tree9c4a38594a3ff706aeedd20014ba8b90b887d401 /src/html
parentSupport multiple languages for "categories" string (diff)
downloadmkwb-1fce51b295283d3ac2ae8a36d81e44845fb27415.tar.gz
mkwb-1fce51b295283d3ac2ae8a36d81e44845fb27415.tar.xz
src/conf: Support i18n of $header_links
Diffstat (limited to '')
-rwxr-xr-xsrc/html8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/html b/src/html
index e208af9..e00a2b7 100755
--- a/src/html
+++ b/src/html
@@ -113,13 +113,9 @@ fi
headlinks() {
- if [ -z "${header_links:-}" ]; then
- return
- fi
-
echo ' <ol>'
- while read -r line; do
+ cat "$header_links" | grep -v '^#' | grep . | while read -r line; do
link="$(printf '%s\n' "$line" | cut -d' ' -f1)"
name="$(printf '%s\n' "$line" | cut -d' ' -f2)"
cat <<EOF
@@ -127,7 +123,7 @@ headlinks() {
<a href="$base_url_prefix/$link">$name</a>
</li>
EOF
- done < "$header_links"
+ done
echo ' </ol>'
}