summaryrefslogtreecommitdiff
path: root/src/conf
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-05-01 17:25:31 -0300
committerEuAndreh <eu@euandre.org>2025-05-01 18:19:56 -0300
commit2f2a292b0aab4d1caf98e7681f3f60c1a01fa98a (patch)
tree88368de8a7881a5c32dfbea23eaeebe0676a27dd /src/conf
parentmkdeps.sh: Add default $LANG export (diff)
downloadmkwb-2f2a292b0aab4d1caf98e7681f3f60c1a01fa98a.tar.gz
mkwb-2f2a292b0aab4d1caf98e7681f3f60c1a01fa98a.tar.xz
Support multiple languages for "categories" string
Diffstat (limited to 'src/conf')
-rwxr-xr-xsrc/conf5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf b/src/conf
index 6951462..b7aeb45 100755
--- a/src/conf
+++ b/src/conf
@@ -198,6 +198,10 @@ lastmod_iso="$(dateiso "@$lastmod_epoch" | shesc)"
lastmod_formatted="$(datefmt "$lastmod_iso" | shesc)"
+LEN="$( printf '%s..' "$root_dir" | sed -e 's|//|/|g' -e 's|/$||' | wc -c)"
+lang="$(printf '%s' "$FILENAME" | cut -c "$LEN"- | cut -d/ -f1 | shesc)"
+
+
BASE_URL="$(base_url)"
TITLE_RAW="$(cat -- "$FILENAME" | grep '^= .*' | head -n1 | cut -d' ' -f2- ||
echo 'MISSING')"
@@ -277,6 +281,7 @@ cat <<-EOF
export updatedat_formatted="$updatedat_formatted"
export comment_url="$comment_url"
export discussions_url="$discussions_url"
+ export lang="$lang"
EOF
cat "$FILENAME".embedded-config