From 2f2a292b0aab4d1caf98e7681f3f60c1a01fa98a Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 1 May 2025 17:25:31 -0300 Subject: Support multiple languages for "categories" string --- src/conf | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/conf') 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 -- cgit v1.2.3