From 4536162c42a533f6b406b8a46cdc275234fec461 Mon Sep 17 00:00:00 2001 From: emamaker Date: Wed, 17 May 2023 23:50:29 +0200 Subject: [PATCH] "Pages in this section" instead of "Pages" in subdirectories index file list --- rivet.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rivet.sh b/rivet.sh index c97ca66..e7b45aa 100755 --- a/rivet.sh +++ b/rivet.sh @@ -219,12 +219,19 @@ if ! [ "$SKIP_LIST" ]; then mv "$tmpsed" "$lobjlist" grep "$outdir" "$linklist" > "$llinklist" + +# Modify "Pages" header to show the current section + if [ "$indexf" = "$destdir/index.html" ]; then + llinksec=$linksec + else + llinksec="$linksec in this section" + fi tmpfile="$(mktemp)" rm -f "$tmpfile" cat << EOF >> "$tmpfile"
-

$linksec

+

$llinksec

EOF count='0' while IFS="" read -r line; do