diff options
Diffstat (limited to '')
-rwxr-xr-x | v2/src/bin/index | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/v2/src/bin/index b/v2/src/bin/index index 46e0c88..553cc27 100755 --- a/v2/src/bin/index +++ b/v2/src/bin/index @@ -75,8 +75,7 @@ l="$(lang-for "$FILENAME")" # shellcheck source=/dev/null . src/lib/base."$l".conf -url_part="$(printf '%s' "${FILENAME#"$CONTENT_PREFIX"/}" | sed "s|\.md$|.html|")" -url_absolute="$(url-for "$url_part" | absolute)" +url_absolute="$(url-for "$FILENAME" | absolute)" collection="$(collection-for "$FILENAME")" feed_url="$(url-for "${DIR#"$CONTENT_PREFIX"/}"/feed.xml)" by_category_url="$(url-for "${DIR#"$CONTENT_PREFIX"/}/${by_category_url_name:?}")" @@ -86,6 +85,18 @@ index_category_title_html="$(eval "echo \"\$index_category_${collection}_title\" export url_absolute feed_url by_category_url title_html index_recent_title_html \ index_category_title_html +translations_html="$(cat <<-EOF + <ul class="translation-list"> + $(langs | awk -v coll="$collection" '{ + "coll2path " $0 " " coll | getline coll_path + "url-for " $0 "/" coll_path | getline url + printf " <li><a href=\"%s\">%s</a></li>\n", url, $0 + }') + </ul> +EOF +)" +export translations_html + mkdir -p "$DIR" |