From: Kai Moritz Date: Sun, 3 May 2026 08:30:25 +0000 (+0200) Subject: Fixed the `url`-parameter for the redirect-pages in front-matter X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=3b065ac2be70d1b1de24997c8a5daef4b3635d53;p=maven-thymeleaf-skin Fixed the `url`-parameter for the redirect-pages in front-matter --- diff --git a/src/main/resources/import-in-hugo.sh b/src/main/resources/import-in-hugo.sh index d68acf3..b6d6d99 100644 --- a/src/main/resources/import-in-hugo.sh +++ b/src/main/resources/import-in-hugo.sh @@ -198,14 +198,18 @@ do TITLE=$(echo "$PAGE" | jq -r .name) WEIGHT=$(echo "$PAGE_ENTRY" | jq -r .key) HREF=$(echo "$PAGE" | jq -r .href) - cat <<-EOF > "$TARGET" - --- - title: $TITLE - weight: $WEIGHT - --- - - -

View $TITLE

- EOF + echo "---" > "$TARGET" + echo "title: $TITLE" >> "$TARGET" + if [[ "$CURRENT" -eq 1 ]] + then + echo "url: $CANONICAL$URL" >> $TARGET + else + echo "url: $BASE$URL" >> $TARGET + fi + echo "weight: $WEIGHT" >> "$TARGET" + echo "---" >> "$TARGET" + echo "" >> "$TARGET" + echo "" >> "$TARGET" + echo "

View $TITLE

" >> "$TARGET" fi done