]> juplo.de Git - maven-thymeleaf-skin/commitdiff
Added additional `params` in the front-matter for the redirect-pages
authorKai Moritz <kai@juplo.de>
Sun, 3 May 2026 08:34:12 +0000 (10:34 +0200)
committerKai Moritz <kai@juplo.de>
Sun, 3 May 2026 09:34:15 +0000 (11:34 +0200)
src/main/resources/import-in-hugo.sh

index b6d6d991d8fd01215bfe255eaef05df642bf997b..e3b8fe7879e16809d2bbb7abf814ca33f27bfdf0 100644 (file)
@@ -207,6 +207,15 @@ do
       echo "url: $BASE$URL" >> $TARGET
     fi
     echo "weight: $WEIGHT" >> "$TARGET"
+    echo "params:" >> "$TARGET"
+    if [[ "$CURRENT" -eq 1 ]]
+    then
+      echo "  current: true" >> "$TARGET"
+    fi
+    if [[ "$ARCHIVED" -eq 1 ]]
+    then
+      echo "  canonical: $CANONICAL$URL" >> "$TARGET"
+    fi
     echo "---" >> "$TARGET"
     echo "<script type="text/javascript">window.location.replace('../../$HREF')</script>" >> "$TARGET"
     echo "<noscript><p>JavaScript is deactivated.</p></noscript>" >> "$TARGET"